rhel5.3服务器安装centOS的yum源

1.删除rhel5.3自带的yum

CODE:

rpm -aq|grep yum|xargs rpm -e --nodeps2.下载所需的rpm包

CODE:

wget http://centos.ustc.edu.cn/centos/5.3/os/i386/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm
wget http://centos.ustc.edu.cn/centos/5.3/os/i386/CentOS/yum-metadata-parser-1.1.2-2.el5.i386.rpm
wget http://mirror.centos.org/centos-5/5.3/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
wget http://mirror.centos.org/centos-5/5.3/os/i386/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
3.安装rpm包
安装顺序:

CODE:

rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-2.el5.i386.rpm
rpm -ivh yum-3.2.19-18.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
注意:在这个地方第三步一定要两个一起安装,要不会会出现错误:

CODE:

# rpm -ivh yum-3.2.19-18.el5.centos.noarch.rpm
warning: yum-3.2.19-18.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
yum-fastestmirror is needed by yum-3.2.19-18.el5.centos.noarch

CODE:

# rpm -ivh yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
warning: yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
yum >= 3.0 is needed by yum-fastestmirror-1.1.16-13.el5.centos.noarch
4.下载配置源:

CODE:

cd /etc/yum.repos.d/
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
5.开始享受yum吧

CODE:

yum update

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值