Red Hat Enterprise Linux as Release 4 installation Yum
View the system hairstyle version
[Root@localhost~] # Cat/etc/issue
Red Hat Enterprise Linux as Release 4 (Nahant Update 8)
1. Download package
[root@localhost~] # wget http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm
2. Installation Yum
Rpmbuild –rebuild yum-2.0.8-1.src.rpm
Root@localhost rpms]# cd/usr/src/redhat/rpms/noarch/
[Root@localhost noarch]# RPM-IVH yum-2.0.8-1.noarch.rpm
3, change yum configuration file
[Root@localhost ~]# vi/etc/yum.conf
32-bit
[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://centos.ustc.edu.cn/centos/4/os/i386/
[Updates]
name=red Hat Linux $releasever-updates
Baseurl= http://mirror.centos.org/centos/4/updates/i386/
or 64-bit
[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://centos.ustc.edu.cn/centos/4/os/x86_64/
[Updates]
name=red Hat Linux $releasever-$basearch-base
baseurl=http://centos.ustc.edu.cn/centos/4/os/x86_64/
4, import rpm GPG KEY
RPM--import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
5, installation complete, test under Yum Bar
[Root@localhost noarch]# Yum Update
Install the latest version of PHP or MySQL, please refer to another article I wrote earlier, "Upgrade PHP using Yum in the Redhat Enterprise Edition".
Reproduced from: http://www.kevinick.com/blog/380.html