issue of yum config in rhel 5u5

rhel 5u5上打rpm包是非常烦人的事情,没有license,无法连接redhat的yum源。只好寻求centos的源帮忙。

进入/etc/yum.repos.d目录,里面有一个缺省的源rhel-debuginfo.repo,删掉、重建吧,里面的内容帮助不大。

[molin@localhost downloads]$ cd /etc/yum.repos.d

[molin@localhost downloads]$ vi rhel-debuginfo.repo

文件的内容如下:

[base]
name=CentOS-5 – Base

baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

这个时候如果你直接yum install rpm包的话,会遭遇报错:

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key………….

还需要重新import key:

rpm –import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

 

[root@hundsun ~]# yum install libaio-devel
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 libaio-devel.i386 0:0.3.106-5 set to be updated
—> Package libaio-devel.x86_64 0:0.3.106-5 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
libaio-devel i386 0.3.106-5 base 12 k
libaio-devel x86_64 0.3.106-5 base 11 k

Transaction Summary
================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)

Total download size: 23 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): libaio-devel-0.3.106-5.x86_64.rpm | 11 kB 00:00
(2/2): libaio-devel-0.3.106-5.i386.rpm | 12 kB 00:00
——————————————————————————–
Total 6.8 kB/s | 23 kB 00:03
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libaio-devel 1/2
Installing : libaio-devel 2/2

Installed:
libaio-devel.i386 0:0.3.106-5 libaio-devel.x86_64 0:0.3.106-5

Complete!

现在可以正常的yum了,当然上述的配置都是建立在这样的前提条件的:”能够ping通外网”