天天看点

RHEL 6.3 更换成163的Centos yum 源

删除redhat原有的yum

rpm -aq|grep yum|xargs rpm -e –nodeps

下载yum安装文件

wget http://mirrors.163.com/centos/6.4/os/i386/Packages/yum-3.2.29-30.el6.centos.noarch.rpm

rpm -ivh yum-metadata-parser-debuginfo-1.1.2-4.el5.x86_64.rpm

wget http://mirrors.163.com/centos/6.3/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

wget http://mirrors.163.com/centos/6.3/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

进行安装yum

rpm -ivh python*

rpm -ivh rum*

更改yum源 #我们使用网易的CentOS镜像源

cd /etc/yum.repos.d/

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

vim CentOS6-Base-163.repo #编辑文件

把文件里面的$releasever全部替换为版本号,(:1,$s/$releasever/6.3/g)最后保存!

继续阅读