日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

RHEL 6.3使用CentOS yum源 (redhat yum安装失败)

發(fā)布時(shí)間:2025/3/13 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 RHEL 6.3使用CentOS yum源 (redhat yum安装失败) 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

由于Redhat的yum在線更新是收費(fèi)的,如果沒有注冊(cè)的話是不能使用的,即不能在線安裝軟件。所以yum install 命令每次都安裝失敗

下面介紹一種更改yum源的方式:

系統(tǒng)說明:

系統(tǒng):Red Hat Enterprise Linux Server 6.3

內(nèi)核:Linux 2.6.32-279.el6.x86_64

1、刪除RHEL原有的yum
?? ? rpm -aq|grep yum|xargs rpm -e --nodeps? #刪除

?

2、下載新的yum安裝包? #這里我們使用CentOS的yum源
?????? wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

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-60.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

?(提示:如果下載時(shí)提示404找不到錯(cuò)誤,請(qǐng)?jiān)L問http://mirrors.163.com/centos/6/os/x86_64/Packages/,手動(dòng)查找上面四個(gè)包,有時(shí)候版本會(huì)有點(diǎn)小偏差)

3、安裝yum軟件包

rpm -ivh? python-iniparse-0.3.1-2.1.el6.noarch.rpm

rpm -ivh? yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

rpm -ivh ?yum-3.2.29-60.el6.centos.noarch.rpm???yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

?? ? (這里要注意的是:最后兩個(gè)安裝包要放在一起同時(shí)安裝,否則會(huì)提示相互依賴,安裝失敗。)

4、更改yum源? #我們使用網(wǎng)易的CentOS鏡像源

cd /etc/yum.repos.d/

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

vi CentOS6-Base-163.repo? #編輯文件

把文件里面的$releasever全部替換為版本號(hào),即6 最后保存!

?

或者直接把下面的內(nèi)存拷貝到CentOS6-Base-163.repo文件中即可

(已經(jīng)修改好,不用下載直接新建CentOS6-Base-163.repo 也???? 可以)

?

# CentOS-Base.repo

#

# 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-6 - Base - 163.com

baseurl=http://mirrors.163.com/centos/6/os/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

?

#released updates

[updates]

name=CentOS-6 - Updates - 163.com

baseurl=http://mirrors.163.com/centos/6/updates/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

?

#additional packages that may be useful

[extras]

name=CentOS-6 - Extras - 163.com

baseurl=http://mirrors.163.com/centos/6/extras/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

?

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-6 - Plus - 163.com

baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

?

#contrib - packages by Centos Users

[contrib]

name=CentOS-6 - Contrib - 163.com

baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

?5、收尾,測(cè)試YUM 是否可用

yum clean all???? #清理yum緩存

yum makecache???? #將服務(wù)器上的軟件包信息緩存到本地,以提高搜索安裝軟件的速度

yum install vim*? #測(cè)試yum是否可用

轉(zhuǎn)載于:https://www.cnblogs.com/tina-smile/p/4425949.html

總結(jié)

以上是生活随笔為你收集整理的RHEL 6.3使用CentOS yum源 (redhat yum安装失败)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。