rhel6 use centos repo

系统环境 rhel_6.3 中操作

1. 卸载 rhel 自带 yum 及其 依赖包

1
2
3
rpm -qa | grep yum | xargs rpm -e --nodeps
# -e --nodeps 强制卸载
1
rpm -qa | grep python-urlgrabber | xargs rpm -e --nodeps

2. 下载 centos yum 及其 依赖包

2.1. python-urlgrabber

1
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm

2.2. yum-plugin-fastestmirror

1
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm

2.3. yum-metadata-parser

1
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

2.4. yum

1
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm

3. 安装

1
2
3
4
5
6
rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
# 这3个包 最好同时安装
rpm -ivh yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm \
yum-metadata-parser-1.1.2-16.el6.x86_64.rpm \
yum-3.2.29-81.el6.centos.noarch.rpm