標籤:http sed rsa less sig header 軟體 system extra
問題:使用 Red Hat Enterprise Linux Server(RHEL) yum安裝軟體時顯示 This system is not registered with RHN. RHN support will be disabled.
原因:
Red Hat Enterprise Linux Server(RHEL) 的yum服務是付費的,因為沒有付費,所以無法使用yum安裝軟體,如RHEL想安裝YUM,一種可行的辦法是移植使用CentOS的YUM。
解決方案:
步驟一:卸載RHEL的yum,並下載CentOS的對應軟體包
執行:rpm -qa|grep yum|xargs rpm -e --nodeps 將yum卸載掉
cat /etc/issue && uname -a 看一下系統版本號碼和系統位元
到 http://mirrors.kernel.org/centos/ 或 http://mirrors.163.com/centos/ 找對應系統版本號碼
如果系統是5.* 64位,則開啟http://mirrors.kernel.org/centos/5/os/x86_64/CentOS/
如果系統是5.* 32位,則開啟http://mirrors.kernel.org/centos/5/os/i386/CentOS/
如果系統是6.* 64位:http://mirrors.kernel.org/centos/6/os/x86_64/Packages/
如果系統是6.* 32位:http://mirrors.kernel.org/centos/6/os/i386/Packages/
下載的檔案包括:
python-iniparse-0.3.1-2.1.el6.noarch.rpm
python-urlgrabber-3.9.1-11.el6.noarch.rpm
yum-3.2.29-73.el6.centos.noarch.rpm
yum-metadata-parser-1.1.2-16.el6.i686.rpm
yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
步驟二:安裝CentOS的對應軟體包
安裝步驟:
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 python-urlgrabber-3.9.1-11.el6.noarch.rpm
這一步可能出如下錯誤
warning: python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.py from installof python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from packagepython-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyc from installof python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from packagepython-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyo from installof python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from packagepython-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyc from installof python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from packagepython-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyo from installof python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from packagepython-urlgrabber-3.9.1-8.el6.noarch
原因是包衝突,需要卸載原有的urlgrabber包:
[[email protected]]# rpm -qa |grep urlgrabber
python-urlgrabber-3.9.1-8.el6.noarch
[[email protected]]# rpm -e python-urlgrabber-3.9.1-8.el6.noarch
然後再安裝。
然後安裝yum
rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
步驟三:產生yum.repos.d檔案
到http://mirrors.163.com的 centos協助文檔 中下載CentOS6-Base-163.repo檔案,存放到/etc/yum.repos.d中
#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
改名為:CentOS6-Base.repo
然後把檔案裡的$releasever都改為你的Linux版本(6或者5),也就是檔案修改成如下即可:
# CentOS-Base.repo
#
# The mirror systemuses the connecting IP address of the client and the
# update status ofeach mirror to pick mirrors that are updated to and
# geographicallyclose to the client. You should use this for CentOS updates
# unless you aremanually picking other mirrors.
#
# If themirrorlist= does not work for you, as a fall back you can try the
# remarked outbaseurl= 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
#additionalpackages 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
#additionalpackages 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
步驟四:重建緩衝
yum clean all 清除原有緩衝
yummakecache 擷取yum列表
等待,大約三分鐘後出現下面提示,表示yum更改完成:
Metadata CacheCreated
RHEL6.5 移植使用CentOS 的YUM 步驟