|
1. Remove rhel comes yum source
# Rpm -aq | grep yum | xargs rpm -e --nodeps
2. Download the new yum install package
wget http://mirrors.163.com/CentOS/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-69.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
3, install yum package, noting that marked red must be installed together with dependencies
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-69.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch .rpm
4, change into yum source 163
# Cd /etc/yum.repos.d/
# Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
# Ls
CentOS6-Base-163.repo
The documents which replace all of $ releasever version number, namely 6
# Sed -i 's # $ releasever # 6 # g' CentOS6-Base-163.repo
5, clear the yum cache
# Yum clean all
# Yum makecache # package information will be cached on the local server, install software to improve search speed. |
|
|
|