在redhat 4中,yum需要单独地安装:
(1)先查看当前redhat系统的版本:cat /etc/issue
显示:Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
Kernel \r on an \m
系统信息存放在issue文件中。
(2)下载yum软件包:http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm
(3)安装
$sudo rpmbuild --rebuild yum-2.0.8-1.src.rpm
(4)安装成功后,进入到:/usr/src/redhat/RPMS/noarch/,并安装yum的rpm包:
$cd /usr/src/redhat/RPMS/noarch/
$sudo rpm -ivh yum-2.0.8-1.noarch.rpm
(5)yum的配置文件(如果没有的话,可以自己创建)
$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/
或者
(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/
现在问题的关键是,AS4的yum源现在都不维护了,好多源地址都不可用,少数可用的,rpm包还不全。现在是AS5和AS6最常用了。
(6)测试yum命令:
$yum -y install lzo-devel zlib-devel
Red Hat Enterprise Linux AS release 4 配置YUM(rhel as 4 安装yum),布布扣,bubuko.com
Red Hat Enterprise Linux AS release 4 配置YUM(rhel as 4 安装yum)