亲宝软件园·资讯

展开

在RHEL系统中使用CentOS的yum源的方法

人气:0

RHEL6中
1、卸载自身yum

# rpm -aq|grep yum|xargs rpm -e --nodeps

2、下载centos6相关包

#wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
#wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
#wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
#wget http://mirrors.163.com/centos/6.0/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

3、安装

# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
# rpm -ivh yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
# rpm -ivh yum-3.2.27-14.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

4、复制centos6中的repo到RHEL6

centos6#scp /etc/yum.repos.d/CentOS-Base.repo rhel6:/etc/yum.repos.d/CentOS-Base.repo
rhel6# vi /etc/yum.repos.d/CentOS-Base.repo

编辑:

:%s/$releasever/6.0/

5、导入centos6的key

centos6#scp /media/CentOS/RPM-GPG-KEY-CentOS-6 rhel6:/tmp
rhel6#rpm --import /tmp/RPM-GPG-KEY-CentOS-6

6、使用

# yum clean all
# yum list

没有报错

加载全部内容

相关教程
猜你喜欢
用户评论