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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章