在标准的Redhat Enterprise Linux上,默认没有安装yum,需要单独下载并安装。
此外,Redhat Enterprise Linux的更新是由Redhat提供的收费服务
但由于Redhat Enterprise Linux和CentOS是基本通用的,所以可用CentOS源来升级redhat
1 首先安装yum和相关的rpm包(注意:本安装包只提供给as4系统之用)
下载http://www.haoxm.net/tools/yum_forAS4.tar.gz(也可在其它地方下载),并解压和安装yum包和升级文件
rpm -ivh *.rpm
python-elementtree-1.2.6-7.el4.rf.i386.rpm
python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum-2.4.2-0.4.el4.rf.noarch.rpm
2. 将解压缩后得到的CentOS-Base.repo复制到/etc/yum.repos.d/目录里边
特别注意:本CentOS-Base.repo文件里面所写的URL已经无效了,特改成以下内容:
[base]
name=CentOS-4 - Base
baseurl=http://vault.centos.org/4.0/os/i386
gpgcheck=1
gpgchk=http://vault.centos.org/4.0/os/i386/RPM-GPG-KEY-CentOS-4
[update]
name=CentOS-4 - Updates
baseurl=http://vault.centos.org/4.0/updates/i386/
gpgcheck=1
gpgchk=http://vault.centos.org/4.0/os/i386/RPM-GPG-KEY-CentOS-4
[addons]
name=CentOS-4 - Addons
baseurl=http://vault.centos.org/4.0/addons/i386/
gpgcheck=1
gpgchk=http://vault.centos.org/4.0/os/i386/RPM-GPG-KEY-CentOS-4
[extras]
name=CentOS-4 - Extras
baseurl=http://vault.centos.org/4.0/extras/i386/
gpgcheck=1
gpgchk=http://vault.centos.org/4.0/os/i386/RPM-GPG-KEY-CentOS-4
[centosplus]
name=CentOS-4 - Plus
baseurl=http://vault.centos.org/4.0/centosplus/i386/
gpgcheck=1
enabled=1
gpgchk=http://vault.centos.org/4.0/os/i386/RPM-GPG-KEY-CentOS-4
[contrib]
name=CentOS-4 - Contrib
baseurl=http://vault.centos.org/4.0/contrib/i386/
gpgcheck=1
enabled=1
gpgchk=http://vault.centos.org/4.0/os/i386/RPM-GPG-KEY-CentOS-4
3 导入:rpm --import http://vault.centos.org/4.0/os/i386/RPM-GPG-KEY-CentOS-4
转载于:https://blog.51cto.com/1146242/910234