现在的位置: 首页 > 综合 > 正文

RHEL5系统下配置YUM源的方法

2013年07月21日 ⁄ 综合 ⁄ 共 939字 ⁄ 字号 评论关闭

1. 导入KEY

#rpm --import http://ftp.twaren.net/Linux/CentOS/RPM-GPG-KEY-CentOS-5

 

2. 编辑配置文件

vi /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 
除了默认有的,复制添加以下更新点插入到rhel-debuginfo.repo文本里后面
 [base]
name=Red Hat Enterprise Linux $releasever -Base
baseurl=http://ftp.twaren.net/Linux/CentOS/5/os/$basearch/
gpgcheck=1
[update]
name=Red Hat Enterprise Linux $releasever -Updates
baseurl=http://ftp.twaren.net/Linux/CentOS/5/updates/$basearch/
gpgcheck=1
[extras]
name=Red Hat Enterprise Linux $releasever -Extras
baseurl=http://ftp.twaren.net/Linux/CentOS/5/extras/$basearch/
gpgcheck=1
[addons]
name=Red Hat Enterprise Linux $releasever -Addons
baseurl=http://ftp.twaren.net/Linux/CentOS/5/addons/$basearch/
gpgcheck=1
#yum clean all 清除缓存、旧包
#yum install httpd 测试是否正常

抱歉!评论已关闭.