Red Hat Enterprise Linux AS release 4 安裝YUM__Linux

來源:互聯網
上載者:User

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

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.