红联Linux门户
Linux帮助

RedHat Enterprise Linux 5系列更新Yum源

发布时间:2014-09-24 09:38:43来源:linux网站作者:baiying

同事提供的RedHat Enterprise Linux 5系列更新Yum源为163的yum源:


1.导入CentOS-5的GPG证书

#rpm --import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5


2.让yum使用网易的源:

#cd /etc/yum.repos.d/

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


3.修改repo文件

在所有mirrorlist前面加上#,把所有$releasever替换成5,保存

#sed -i '/mirrorlist/d' CentOS-Base-163.repo

#sed -i 's/\$releasever/5/' CentOS-Base-163.repo


4.清理并重新生成yum缓存

#yum clean metadata

#yum makecache