Red Hat Enterprise Linux Server release 6.4 x64 安裝 yum 源,x64yum

來源:互聯網
上載者:User

Red Hat Enterprise Linux Server release 6.4 x64 安裝 yum 源,x64yum

本想將mongodb安裝到redhat中,yum不能使用,看網上說可以另外安裝。

試了幾次網上的,沒有成功。看著看著也發現規律,知道怎麼改了。


先把內建的卸載:

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


下載幾個必要的包:(我這是64位的,不是的話先訪問http://ftp.sjtu.edu.cn/centos/6/os/確定)

wget http://ftp.sjtu.edu.cn/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpmwget http://ftp.sjtu.edu.cn/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpmwget http://ftp.sjtu.edu.cn/centos/6/os/x86_64/Packages/yum-3.2.29-60.el6.centos.noarch.rpmwget http://ftp.sjtu.edu.cn/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

安裝yum:

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpmrpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpmrpm -ivh yum-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm


編輯repo包:(如果也可以先把它刪除)

vi /etc/yum.repos.d/CentOS-Base.repo

[base]name=CentOS-6-Base#mirrorlist=http://mirrorlist.centos.org/?release=$releasever6&arch=$basearch&repo=os#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/baseurl=http://ftp.sjtu.edu.cn/centos/6/os/$basearch/gpgcheck=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates[update]name=CentOS-6-Updates#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updatesbaseurl=http://ftp.sjtu.edu.cn/centos/6/updates/$basearch/gpgcheck=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#packages used/produced in the build but not released[extras]name=CentOS-6-Extras#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extrasbaseurl=http://ftp.sjtu.edu.cn/centos/6/extras/$basearch/gpgcheck=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-6-Plus#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplusbaseurl=http://ftp.sjtu.edu.cn/centos/6/centosplus/$basearch/gpgcheck=0enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-6-Contrib#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contribbaseurl=http://ftp.sjtu.edu.cn/centos/6/contrib/$basearch/gpgcheck=0enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

注意檢查上面的每個網址路徑,在網頁上訪問看看是否存在,如果是其他版本,把上面的6更改掉,其他版本可能還有其他配置(如 centos5還有[addons])。

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #這個也要對應版本


匯入gpgkey:(當前是使用第二行匯入)

#rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6rpm --import http://ftp.sjtu.edu.cn/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6


清除緩衝:

yum clean all

測試yum安裝:

yum install vim


yum install mysql*


成功安裝!~


參考:

http://blog.itpub.net/23890223/viewspace-757724/

http://blog.itpub.net/25313300/viewspace-708509/

http://blog.chinaunix.net/uid-20729583-id-2972852.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.