redhat5.6 配置CentOS的Yum

來源:互聯網
上載者:User

今天實戰了下redhat5.6企業版,收費的呀

解決方案就是“用CentOS的yum更新源來實現RHEL5的YUM功能”

一、

下載CentOS5.6下的四個YUM檔案,:http://centos.ustc.edu.cn/centos/

執行

rpm -ivh --nodeps yum-updatesd-0.9-2.el5.noarch.rpm
rpm -ivh --nodeps yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
rpm -ivh --nodeps yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
rpm -ivh yum-3.2.22-33.el5.centos.noarch.rpm

二、

進入/etc/yum.erpos.d/,備份原有的redhat源列表設定檔

cd /etc/yum.repos.d/
mv rhel-debuginfo.repo rhel-debuginfo.repo.bak(這個其實我沒備份)

下載CentOS-Base.repo,:http://mirrors.ustc.edu.cn/centos/CentOS-Base.5.mirrors.repo

三、

用vi開啟 CentOS-Base.repo.

將CentOS-Base.repo中所有的$releasever替換為5.6

一切OK拉,當然我還要繼續裝Orcale

附件;CentOS-Base.repo

#################################################################

# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-5.6 - Base
baseurl=http://mirrors.ustc.edu.cn/centos/5.6/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-5.6 - Updates
baseurl=http://mirrors.ustc.edu.cn/centos/5.6/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-5.6 - Addons
baseurl=http://mirrors.ustc.edu.cn/centos/5.6/addons/$basearch/
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-5.6 - Extras
baseurl=http://mirrors.ustc.edu.cn/centos/5.6/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5.6 - Plus
baseurl=http://mirrors.ustc.edu.cn/centos/5.6/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

相關文章

聯繫我們

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