废话少说,直接上脚本:
rpm -qa | grep yum | xargs rpm -e --nodeps
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
cp CentOS6-Base-163.repo /etc/yum.repos.d/
sed -i 's#$releasever#6#g' /etc/yum.repos.d/CentOS6-Base-163.repo
#yum clean all
#yum makecache&&
yum install epel-release -y&&sed -i 's#https#http#g' /etc/yum.repos.d/epel.repo&&yum clean all&&yum makecache
所需软件包:
软件包使用方法:
进入已压缩打包文件夹下载: rhel6.4-yum2CentOS.tar.gz 以管理员身份直接拷贝下面命令执行即可:
tar zxf rhel6.4-yum2CentOS.tar.gz;cd rhel6.4-yum2CentOS;./setup.sh