RHEL6.4更改为CentOS6.4的yum源

# 删除原有的yum包

rpm -qa | grep yum|xargs rpm -e --nodeps


# 下载CentOS的yum安装包

wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm

wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm


# 安装yum包

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm


# 添加163的yum源

cd /etc/yum.repos.d

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

sed -i 's/\$releasever/6/g' CentOS6-Base-163.repo


# 清理yum缓存

yum clean all


# 将服务器上的软件包信息缓存到本地,以提高速度

yum makecache


本文出自 “烟花易冷” 博客,转载请与作者联系!

你可能感兴趣的:(linux,centos,yum,RHEL)