Redhat EL5.4用CentOS源進行更新

Redhat EL5.4用CentOS源進行更新 1.備份或刪除yum源配置文件 #cd /etc/yum.repos.d #mv rhel-debuginfo.repo rhel-debuginfo.repo.bak 2.編輯CentOS-Base.repo,填入以下內容 [base] name=CentOS-5 - Base repo=os baseurl=http://centos.ustc.edu.cn/centos/5/os/$basearch/ gpgcheck=1 gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 [update] name=CentOS-5 - Updates baseurl=http://centos.ustc.edu.cn/centos/5/updates/$basearch/ gpgcheck=1 gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 [addons] name=CentOS-5 - Addons baseurl=http://centos.ustc.edu.cn/centos/5/addons/$basearch/ gpgcheck=1 gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 [extras] name=CentOS-5 - Extras baseurl=http://centos.ustc.edu.cn/centos/5/extras/$basearch/ gpgcheck=1 gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 [centosplus] name=CentOS-5 - Plus baseurl=http://centos.ustc.edu.cn/centos/5/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 [contrib] name=CentOS-5 - Contrib baseurl=http://centos.ustc.edu.cn/centos/5/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 3.從http://centos.ustc.edu.cn/centos/5.4/os/i386/CentOS/下載以下文件並安裝 yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm yum-3.2.22-20.el5.centos.noarch.rpm yum-updatesd-0.9-2.el5.noarch.rpm 或者找個FTP站點用wget下載: #wget ftp://ftp.pdc.kth.se/pub/bambi/centos/5.4/os/i386/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm #wget ftp://ftp.pdc.kth.se/pub/bambi/centos/5.4/os/i386/CentOS/yum-3.2.22-20.el5.centos.noarch.rpm #wget ftp://ftp.pdc.kth.se/pub/bambi/centos/5.4/os/i386/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm #rpm -ivh yum*.rpm 4.如果http://centos.ustc.edu.cn/centos這個服務器的CentOS映像不夠快的話用自己適合的服務器替換,可以用IE上去先看看 5.導入KEY文件,注意大小寫 rpm --import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 6.測試 #yum list 注意:因爲需要解析域名,所以需要先配置好DNS,不建議直接用IP地址
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章