廢話少說,直接上腳本:node
rpm -qa | grep yum | xargs rpm -e --nodepspython
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpmcentos
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpmspa
rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpmip
cp CentOS6-Base-163.repo /etc/yum.repos.d/get
sed -i 's#$releasever#6#g' /etc/yum.repos.d/CentOS6-Base-163.repoast
#yum clean alltest
#yum makecache&&sed
yum install epel-release -y&&sed -i 's#https#http#g' /etc/yum.repos.d/epel.repo&&yum clean all&&yum makecache打包
所需軟件包:RHEL6.4換CentOS源軟件包 http://pan.baidu.com/s/1pJ7bAEf
軟件包使用方法:
進入已壓縮打包文件夾下載: rhel6.4-yum2CentOS.tar.gz 以管理員身份直接拷貝下面命令執行便可:
tar zxf rhel6.4-yum2CentOS.tar.gz;cd rhel6.4-yum2CentOS;./setup.sh