- 删除RHEL中的yum命令
# rpm -aq | grep yum |xargs rpm -e --nodeps
- 下载rpm包(具体版本号到Packages下查看)
# wget http://mirrors.163.com/centos/6.7/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
# wget http://mirrors.163.com/centos/6.7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
# wget http://mirrors.163.com/centos/6.7/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
- 安装rpm包
- 删除自带的yum源
- 下载yum源并修改版本号
# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
# vim CentOS6-Base-163.repo
:0,$s/$releasever/6/g #替换所有的$releasever为指定的版本号,此处为 RHEL 6.0
- 清除缓存
# yum clean all
# yum makecache