rhel 6.5 x86_64 配置centos yum源

來源:互聯網
上載者:User

標籤:redhat rhel 6.5 yum源

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/73/55/wKioL1X6iCGhIIqkAACNkbOZ8S8981.jpg" alt="wKioL1X6iCGhIIqkAACNkbOZ8S8981.jpg" height="98" width="446" />


1、刪除rhel內建的yum源

# rpm -aq | grep yum|xargs rpm -e --nodeps

2、下載新的yum安裝包

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-69.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

3、安裝yum包,注意的是標紅的必須一起裝,有依賴關係

rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-69.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

4、更改成163的yum源

# cd /etc/yum.repos.d/

# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

# ls
CentOS6-Base-163.repo

把檔案裡面的$releasever全部替換為版本號碼,即6

# sed -i ‘s#$releasever#6#g‘ CentOS6-Base-163.repo

5、清除yum緩衝

# yum clean all

# yum makecache     #將伺服器上的軟體包資訊緩衝到本地,以提高搜尋安裝軟體的速度


本文出自 “肖海” 部落格,請務必保留此出處http://eveday.blog.51cto.com/10577430/1699599

rhel 6.5 x86_64 配置centos yum源

相關文章

聯繫我們

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