复制代码代码如下:
[root@localhost /]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
rhel-debuginfo.repo
[root@localhost yum.repos.d]#
复制代码代码如下:
[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]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///RPMS/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
更新软件包
复制代码代码如下:
[root@localhost RPMS]# yum update
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
rhel-debuginfo | 951 B 00:00
rhel-debuginfo/primary | 829 kB 00:00
rhel-debuginfo 2292/2292
Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update
[root@localhost RPMS]#
这样应该就可以了,你可以检验一下[以gcc为例]:
复制代码代码如下:
[root@localhost RPMS]# yum install gcc
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i386 0:4.1.2-46.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================
Package Arch Version Repository Size
==============================================================================================
Installing:
gcc i386 4.1.2-46.el5 rhel-debuginfo 5.2 M
Transaction Summary
==============================================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 5.2 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : gcc 1/1
Installed:
gcc.i386 0:4.1.2-46.el5
Complete!
[root@localhost RPMS]#