redhat默認自帶的yum源須要註冊,才能更新,報錯:node
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
可替換爲centos對應的源。 操做以下:python
一、刪除redhat原有的yumcentos
rpm -aq|grep yum|xargs rpm -e –nodeps
二、下載yum安裝文件url
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.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-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
三、安裝組件spa
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
下面安裝失敗了code
# rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm warning: yum-3.2.29-81.el6.centos.noarch.rpm:Header V3 RSA/SHA1Signature, key ID c105b9de: NOKEY error: Failed dependencies: python-urlgrabber >= 3.9.1-10 is needed byyum-3.2.29-81.el6.centos.noarch
少python-urlgrabber 組件,下載:blog
http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm # rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm warning:python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key IDc105b9de: 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-9.el6.noarch file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyc frominstall of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file frompackage python-urlgrabber-3.9.1-9.el6.noarch file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyo frominstall of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file frompackage python-urlgrabber-3.9.1-9.el6.noarch file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyc frominstall of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file frompackage python-urlgrabber-3.9.1-9.el6.noarch file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyo frominstall of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file frompackage python-urlgrabber-3.9.1-9.el6.noarch
安裝源ip
http://mirrors.163.com/.help/CentOS7-Base-163.repo
把文件裏面的$releasever所有替換爲版本號:6ci