1.首先查看redhat 7.0系统本身所安装的那些yum 软件包:

  rpm -qa | grep yum              #列出所有已安装的yum包

2.删除这些包:

  rpm -e *.rpm --nodeps            #删除所有以前的yum包

3.下载新的yum rpm包:(2016/12/8 最新版本rpm,如果404 NOT FOUND错误,自己进去网址,换成最新的rpm包的名字)

  wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm

  wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

  wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-34.el7.noarch.rpm

  wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-34.el7.noarch.rpm

  wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm

4.安装下载的rpm包:

  rpm -ivh yum-*

5.配置CentOS-Base.repo:(2016/12/8 最新源网址配置)

  vim /etc/yum.repos.d/CentOS-Base.repo

  [base]
  name=CentOS-7-Base
  baseurl=http://mirrors.sohu.com/centos/7/os/x86_64/
  gpgcheck=1
  #released updates
  [updates]
  name=CentOS-7- Updates
  baseurl=http://mirrors.163.com/centos/7/updates/x86_64/
  gpgcheck=1
  gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
  #packages used/produced in the build but not released
  [addons]
  name=CentOS-7- Addons
  baseurl=http://mirrors.163.com/centos/7/sclo/x86_64/sclo/
  gpgcheck=1
  gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
  #additional packages that may be useful
  [extras]
  name=CentOS-7- Extras
  baseurl=http://mirrors.163.com/centos/7/extras/x86_64/
  gpgcheck=1
  gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
  #additional packages that extend functionality of existing packages
  [centosplus]
  name=CentOS-7- Plus
  baseurl=http://mirrors.163.com/centos/7/centosplus/x86_64/
  gpgcheck=1
  enabled=0

6.yum源配置完成:

  yum clean all

7.测试yum是否成功:

  yum update python

  报错:You have enabled checking of packages via GPG keys. This is a good thing. However, you do not have any GPG public keys installed. You need to download the keys for packages you wish to install and install them. You can do that by running the command.

  rpm --import public.gpg.key

  .........

  经查,是key的错误,解决方法是:

  cd /etc/pki/rpm-gpg/

  ls                        #列出所有密钥

  导入以 release 结尾的密钥

  rpm --import RPM-GPG-KEY-redhat-legacy-release

8.经测试,yum成功:

  yum update python               #顺利使用yum

rhel 7.0 配置centos yum源(2016/12/8),成功!的更多相关文章

  1. RHEL 6.0使用CentOS yum源

    引言:由于RHEL的yum在线更新是收费的,如果没有注册的话是不能使用的,即不能在线安装软件.在这种情况下,想使用RHEL系统,还想用yum源来在线安装软件,有没有办法?答案是有办法,请往下看! 1. ...

  2. RHEL6配置CentOS yum源

    RHEL6配置CentOS yum源

  3. RHEL 6.3使用CentOS yum源 (redhat yum安装失败)

    由于Redhat的yum在线更新是收费的,如果没有注册的话是不能使用的,即不能在线安装软件.所以yum install 命令每次都安装失败 下面介绍一种更改yum源的方式: 系统说明: 系统:Red ...

  4. rhel7.0替换centos yum源

    1:卸载原先的yum 2:安装centos的yum 有以下的yum yum-utils-1.1.31-24.el7.noarch yum-langpacks-0.4.2-3.el7.noarch yu ...

  5. RHEL6.×配置Centos YUM源

    Step1: 清除原有的yum源rpm -aq|grep yum|xargs rpm -e --nodeps Step2:下载新的yum()源进行安装,注意操作系统支持64位还是32位wget htt ...

  6. Rhel5.5配置Centos yum源

    ruiy哥,抛砖引玉 当你使用rhel系统时,[大部分数据库中心及政府企业选择linux服务器时通常考虑采购的版本一般不外乎是Rhel红帽及Suse,理由你懂的EcoSystem!]你没有一个红帽网络 ...

  7. RedHat 更新CentOS Yum源(转)

    经测试,可用.转自:https://www.cnblogs.com/tangsen/p/5151994.html 一.随笔引言 1.1随笔内容: 1.RedHat 配置Centos yum源 2.yu ...

  8. 使用 ISO镜像配置 本地yum 源(RHEL, CentOS, Fedora等适用)

    使用 ISO镜像配置 本地yum 源(RHEL, CentOS, Fedora等适用)   1.上传ISO镜像和挂载 1) 上传Centos7.2 ISO镜像到 /usr/local/src目录 2) ...

  9. (转载)centos yum源的配置和使用

    原文地址:http://www.cnblogs.com/mchina/archive/2013/01/04/2842275.html 一.yum 简介 yum,是Yellow dog Updater, ...

随机推荐

  1. MIT 6.828 JOS学习笔记3. Exercise 1.2

    这篇博文是对Lab 1中的Exercise 2的解答~ Lab 1 Exercise 2: 使用GDB的'si'命令,去追踪ROM BIOS几条指令,并且试图去猜测,它是在做什么.但是不需要把每个细节 ...

  2. python 异常

    引用一段来自菜鸟教程的文章:http://www.runoob.com/python/python-exceptions.html Python 异常处理 python提供了两个非常重要的功能来处理p ...

  3. Codeforces 307 div2 E.GukiZ and GukiZiana 分块

    time limit per test 10 seconds memory limit per test 256 megabytes input standard input output stand ...

  4. Ubuntu下使用vsftpd实现FTP

    ## 哈哈哈啊哈 被领导啪啪啪打脸,文件连在线打开都不行,你做事情的时候有没有考虑过别人使用时的感受!! 需求: 部门老大希望在内网搭建一个用于员工共享文件的系统. 很自然的就想到通过FTP去实现. ...

  5. Python for Infomatics 第12章 网络编程二(译)

    注:文章原文为Dr. Charles Severance 的 <Python for Informatics>.文中代码用3.4版改写,并在本机测试通过. 12.3 用HTTP协议获取一张 ...

  6. Codeforces Round B. Buttons

    Manao is trying to open a rather challenging lock. The lock has n buttons on it and to open it, you ...

  7. [我的试题]Test of String

    1.前言 这是我出的第一套题目,话说感觉有点晚了,还是在向总安排下出的.我被安排的是字符串方面的内容,这应该相对而言是比较小众的知识点吧,但是一样的有作用的,也有很神的题目.所谓是NOIP模拟题,其实 ...

  8. Predicate<T>与Func<T, bool>泛型委托

    引用别人的: static void Main(string[] args) { List<string> l = new List<string>(); l.Add(&quo ...

  9. 使用功能强大的插件FastReport.Net打印报表实例

    我第一次使用FastReport插件做的功能是打印一个十分复杂的excel表格,有几百个字段都需要绑定数据,至少需要4个数据源,而且用到横向.竖向合并单元格. 我不是直接连接数据库,而是使用Regis ...

  10. 关于ps中的锯齿

    1.1 索引透明颜色与Alpha透明通道   要说索引颜色透明,首先要讲讲什么是索引颜色,百度百科上有对索引颜色的解释,我觉得很关键的一句是“挑选一副图片中最有代表性的若干种颜色(通常不超过256种) ...