Redhat 5使用contos yum源(保證可以實現)

 

Redhat 5使用contos yum源

首先我們通過rpm -qa | grep yum看一下目前的的RHEL上面的YUM的安裝包

刪除如下三個包,其它的可不用理,事實上理了會出現相關問題

rpm -e yum-updatesd-3.0.1-5.el5
rpm -e yum-rhn-plugin-0.4.3-1.el5
rpm -e yum-3.0.1-5.el5

 

刪除了以後下載centos的源安裝包,如下:

wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm

第一個包可能下載會報錯。自己在其他網站下載吧。下面三個都沒有問題的

wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
wget
http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
wget
http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm

 

 

通過rpm -ivh 安裝以上四個包文件,完成以後

touch /etc/yum.repos.d/Centos-Base.repo

vim /etc/yum.repos.d/Centos-Base.repo

以下是上海交大的yum源:(保證可以實現哦

[base]

name=CentOS-5 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&
repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5.5/os/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#released updates
[update]
name=CentOS-5 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5.5/updates/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons

baseurl=http://ftp.sjtu.edu.cn/centos/5.5/addons/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras

baseurl=http://ftp.sjtu.edu.cn/centos/5.5/extras/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5.5/centosplus/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5.5/contrib/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
 

完成以後運行yum update

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