配置163 yum 源

網易開源的鏡像站 :http://mirrors.163.com/

由於網易沒有redhat源,我們使用centos源進行代替

查看操作系統版本信息:

[root@localhost yum.repos.d]# lsb_release -a

 LSB Version: :core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch

 Distributor ID: RedHatEnterpriseServer

 Description: Red Hat Enterprise Linux Server release 5.6 (Tikanga)

 Release: 5.6

 Codename: Tikanga

導入證書

rpm -import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5

下載網易repo文件

cd /etc/yum.repos.d

wget http://mirrors.163.com/.help/CentOS5-Base-163.repo

修改文件(把所有$releasever替換成5,保存
vi /etc/yum.repos.d/CentOS5-Base-163.repo

在命令模式下:%s/$releasever/5/g

不改的話,會出現下列錯誤

 

情況緩存 yum clean all

進行測試

yum install zsh,可能看到如下錯誤

 

可以通過強制關掉yum進程:

#rm -f /var/run/yum.pidyum list | grep prog 

然後就可以使用yum了。

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