Linux RHEL 5版本由于没有注册,导致yum无法使用,可以使用CentOS的yum来解决这个问题
首先卸载系统的yum
一、删除RedHat 5自带的yum
rpm -qa|grep yum|xargs rpm -e –nodeps
二、安装CentOS 5.4光盘中的或从官方下载
wget http://mirrors.163.com/centos/5.4/os/x86_64/CentOS/yum-3.2.22-20.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5.4/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
wget http://mirrors.163.com/centos/5.4/os/x86_64/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5.4/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm
wget http://mirrors.163.com/centos/5.4/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
wget http://mirrors.163.com/centos/5.4/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
wget http://mirrors.163.com/centos/5.4/os/x86_64/CentOS/rpm-python-4.4.2.3-18.el5.x86_64.rpm
wget http://mirrors.163.com/centos/5.4/os/x86_64/CentOS/python-urlgrabber-3.1.0-5.el5.noarch.rpm
wget http://mirrors.163.com/centos/5.4/os/x86_64/CentOS/m2crypto-0.16-6.el5.6.x86_64.rpm
rpm -ivh m2crypto-0.16-6.el5.6.x86_64.rpm
rpm -ivh python-*
rpm -ivh rpm-python
rpm -ivh yum-*
注意同时安装
三、下载配置
cd /etc/yum.repos.d/
wget http://www.linuxidc.com/system/systemfiles/2010/8/CentOS-Base.repo