In Redhat 4, yum needs to be individually installed:
(1) First view the current Redhat system version: Cat/etc/issue
Displayed: Red Hat Enterprise Linux as Release 4 (Nahant Update 7)
Kernel \ r \m
The system information is stored in the issue file.
(2) Download Yum package: http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm
(3) Installation
$sudo Rpmbuild--rebuild yum-2.0.8-1.src.rpm
(4) After the installation is successful, enter:/usr/src/redhat/rpms/noarch/, and install the Yum RPM package:
$CD/usr/src/redhat/rpms/noarch/
$sudo RPM-IVH yum-2.0.8-1.noarch.rpm
(5) Yum configuration file (if not, you can create it yourself)
$sudo vim/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://apt.sw.be/redhat/el4/en/i386/dag/
Or
(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/
Now the crux of the matter is that the AS4 Yum source is not maintained, many source addresses are not available, a small number of usable, RPM package is not complete. Now AS5 and AS6 are the most commonly used.
(6) Test yum command:
$yum-y Install lzo-devel zlib-devel