curl -o yum-3.2.29-40.el6.centos.noarch.rpm http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
curl -o yum-metadata-parser-1.1.2-16.el6.x86_64.rpm http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
curl -o yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
curl -o python-iniparse-0.3.1-2.1.el6.noarch.rpm http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -Uvh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -Uvh yum-3.2.29-40.el6.centos.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
vi CentOS6-Base-163.repo
把文件里面的$releasever全部替换为版本号,即6 最后保存
yum clean all
yum makecache
参考文章
http://down.chinaz.com/server/201111/1321_1.htm