歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> RedHat Enterprise Linux 5系列更新Yum源

RedHat Enterprise Linux 5系列更新Yum源

日期:2017/2/28 15:44:18   编辑:Linux教程

同事提供的RedHat Enterprise Linux 5系列更新Yum源為163的yum源:

1.導入CentOS-5的GPG證書

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

2.讓yum使用網易的源:

#cd /etc/yum.repos.d/

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

3.修改repo文件

在所有mirrorlist前面加上#,把所有$releasever替換成5,保存

#sed -i '/mirrorlist/d' CentOS-Base-163.repo

#sed -i 's/\$releasever/5/' CentOS-Base-163.repo

4.清理並重新生成yum緩存

#yum clean metadata

#yum makecache

更多RedHat相關信息見RedHat 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=10

Copyright © Linux教程網 All Rights Reserved