Red Hat Enterprise Linux AS release 4 安装YUM

Red Hat Enterprise Linux AS release 4 安装YUM


查看系统发型版本
[root@localhost~] # cat /etc/issue
Red Hat Enterprise Linux AS release 4 (Nahant Update 8)


1、下载软件包
[root@localhost~] # wget http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm

 

2、安装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、更改YUM配置文件

[root@localhost ~]# vi /etc/yum.conf

32位
[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/

 

或64位

[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、导入RPM GPG KEY
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4

 

5、安装完成,测试下YUM吧
[root@localhost noarch]# yum update

 

安装最新版本的PHP或MYSQL,请参照我之前写的另外一篇文章《在RedHat企业版中使用yum升级PHP》。
转载自:http://www.kevinick.com/blog/380.html

 

你可能感兴趣的:(Red Hat Enterprise Linux AS release 4 安装YUM)