redHat更新yum源
1. 网易镜像仓库查找相关rpm 包并下载 :http://mirrors.163.com/centos/6/os/x86_64/Packages/
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/rpm-4.8.0-59.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
2.安装下载的rpm包
rpm2cpio rpm-4.8.0-59.el6.x86_64.rpm | cpio -idmv
rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
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-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
3.修改配置。
cd /etc/yum.repos.d/
下载centos配置文件:
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
备份+改名:
mv rhel-source.repo rhel-source.repo.bak
mv CentOS6-Base-163.repo CentOS-Base.repo
修改配置:
vim CentOS-Base.repo
替换内容;
:1,$s/$releasever/6
清除原有缓存:
yum clean all
重建缓存,以提高搜索安装软件的速度:
yum makecache
更新系统:
yum update