Redhat5-64bit yum源修改为CentOS的yum源问题

解决方案:

1.卸载redhat自带的yum组件
[root@localhost ~]#  rpm -qa|grep yum|xargs rpm -e --nodeps

2.安装centos的yum包

[root@localhost ~]# wget  http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm

[root@localhost ~]# wget  http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

[root@localhost ~]# wget  http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm

root@localhost ~]# rpm -ivh yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm --nodeps

[root@localhost ~]# rpm -ivh yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm --nodeps

[root@localhost ~]# rpm -ivh yum-3.2.22-39.el5.centos.noarch.rpm --nodeps

3. 下载更新源,并存放在系统目录中
[root@localhost ~]# wget  http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

[root@localhost ~]# mv CentOS_Base.repo /etc/yum.repos.d/

4.生成缓存并进行安装
[root@localhost ~]# yum makecache


你可能感兴趣的:(Linux,服务器问题,linux,Linux,LINUX)