RHEL4.4老版本YUM安装

查看系统版本:
 
# cat /etc/redhat-release 
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
 
1.下载软件包: 
wget http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm 
 
2.安装(由于是RPM源码包所以安装比较特殊) 
#rpmbuild --rebuild yum-2.0.8-1.src.rpm 
 
 
3.进入到:/usr/src/redhat/RPMS/noarch/ (这个目录里就一个软件包,貌似准备好安装似的)
 
4. 使用rpm -ivh yum-2.0.8-1.noarch.rpm 安装
 
5.配置文件/etc/yum.conf
# cat /etc/yum.conf 
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
 
#[base]
#name=Red Hat Linux $releasever - $basearch - Base
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/
 
[base]
name=Red Hat Linux $releasever - $basearch - Base
baseurl=http://vault.centos.org/4.4/os/x86_64/
 
 
#[updates]
#name=Red Hat Linux $releasever - Updates
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/
 
[updates]
name=Red Hat Linux $releasever - Updates
baseurl=http://vault.centos.org/4.4/updates/
在此推荐一个好的网站 http://vault.centos.org,这个网站有CentOS2.1到6.3的所有镜像