redhat无法使用yum解决方案

CentOS 替换 RHEL 6.5 YUM源

首先删除
[root@rhel6 ~]# rpm -aq|grep yum|xargs rpm -e --nodeps

安装必要的包
[root@rhel6 ~]# rpm -ivhhttp://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm 
[root@rhel6 ~]# rpm -ivhhttp://mirrors.163.com/centos/6.5/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
[root@rhel6 ~]# rpm -ivhhttp://mirrors.163.com/centos/6.5/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpmhttp://mirrors.163.com/centos/6.5/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

配置yum
[root@rhel6 ~]# cd /etc/yum.repos.d/
[root@rhel6 yum.repos.d]# wgethttp://mirrors.163.com/.help/CentOS6-Base-163.repo
[root@rhel6 yum.repos.d]# sed -i "s/\$releasever/6/"CentOS6-Base-163.repo

你可能感兴趣的:(linux)