RHEL5安裝Centos 5 yum方法

來源:互聯網
上載者:User
對於經常使用CentOS的同學來說,內建的yum是非常好用的,那他的同胞兄弟RHEL5是否也可以安裝yum呢?在網上找了一通資料發現,這完全也是可以實現的,下面我們就來看看他的實現方式:
這裡要先進行卸載rhel裡的yum的yum包
查詢原先安裝的yum包:
rpm -qa|grep yum
根據上面查詢出來的,逐一刪除yum包,這裡有些是有依賴的,所以要加入--nodeps來將它刪除,如:
rpm -e --nodeps yum-3.0.5-1.el5

等等.

###一、建立yum安裝包目錄,並進入到該目錄:
mkdir /tmp/yum-packages
cd /tmp/yum-packages

###二、下載yum所需的所有rpm包:
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm 
wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

###三、先安裝python環境:
rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm

###四、安裝所有的yum包:
rpm -ivh yum-3.2.22-39.el5.centos.noarch.rpm yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

###五、下載設定檔
wget http://sudone.com/download/CentOS-Base.repo -O /etc/yum.repos.d/CentOS-Base.repo
(這裡說明一下,只在在/etc/yum.repos.d/檔案夾下,加入尾碼為.repo的檔案並且它是按yum源格式就可以成為yum新添加的源,所以這裡可以放置你找得到的yum源檔案,有了yum

源安裝更新軟體就相當容易了,加入yum源檔案可以像下面這種方式來擷取網上人家寫好的.repo檔案:wget http://centos.ustc.edu.cn/CentOS-Base.repo.5,然後改一下名字

###六、現在可以進行yum的體驗了

yum update

註:以上連線時間長了可能會串連不上,通常都是版本升級了,你可以訪問他的上一級目錄,去找名字相同的最新版本。

還可以參照下面的網站:

http://blog.csdn.net/hz_chenwenbiaotmb/article/details/6000648

http://hi.baidu.com/suantop/blog/item/514c52fef7cbbb345d6008c9.html
http://xiaoyuningshuang.blog.163.com/blog/static/11980783200851633623839/
http://5551543.blog.hexun.com/31625644_d.html
http://hi.baidu.com/hzw83/blog/item/0f4f9a4f80de4fc6d0c86a71.html
http://os.51cto.com/art/201002/183518.htm
http://os.51cto.com/art/201002/182805.htm

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.