RedHat install yum + configure the domestic yum source, redhatyum
After redhat6.5 is installed, log on to the system and use yum update to update the system. Tip:
This system is not registered to Red Hat sub‑management. You can use sub‑manager to register.
Cannot be updated.
The default yum source of redhat needs to be registered before it can be updated. We want to update the yum source of redhat without spending money. We need to replace the yum source of redhat.
1. Check whether the yum package is installed
Check whether RHEL has yum installed. If yes, what yum packages are available:
[root@localhost ~]# rpm -qa |grep yumyum-metadata-parser-1.0-8.fc6yum-3.0.1-5.el5yum-rhn-plugin-0.4.3-1.el5yum-updatesd-3.0.1-5.el5
2. Delete the yum package that comes with redhat.
Uninstall all yum packages shown above:
[Root @ localhost ~] # Rpm-qa | grep yum | xargs rpm-e -- nodeps (delete the rpm package without checking the dependency) and then use [root @ localhost ~] # Rpm-qa | grep yum [root @ localhost ~] #
View. If no information is displayed, the uninstall is completed.
3. download the new yum package. Use Centos6.5 yum package
[Root @ madao yum. repos. d] # wget http://mirrors.163.com/centos/6/ OS /i386/Packages/yum-3.2.29-60.el6.centos.noarch.rpm
[Root @ madao yum. repos. d] # wget http://mirrors.163.com/centos/6/ OS /i386/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
[Root @ madao yum. repos. d] # wget http://mirrors.163.com/centos/6/ OS /i386/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
[Root @ madao yum. repos. d] # wget http://mirrors.163.com/centos/6/ OS /i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
(The address here is not necessarily correct)
If 404? Go to http://mirrors.163.com/centos/6/ OS /and click "OK ".
Install yum
[Root @ madao yum. repos. d] # rpm-ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm [root @ madao yum. repos. d] # rpm-ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm [root @ madao yum. repos. d] # rpm-ivh yum-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm // rpm-ivh yum and yum-plugin-fastestmirror are dependent, so you have to install them together
If any problem is found, python-urlgrabber must be later than or equal to 3.9.1-10.
# rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpmwarning: yum-3.2.29-73.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEYerror: Failed dependencies: python-urlgrabber >= 3.9.1-10 is needed by yum-3.2.29-73.el6.centos.noarc
View the python information of the system
# rpm -qa|grep python
Found python-urlgrabber-3.9.1-9.el6.noarch version earlier than 3.9.1-10
Uninstall: python-urlgrabber-3.9.1-9.el6.noarch
Rpm e python-urlgrabber-3.9.1-9.el6.noarch
Installation: rpm-ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
Or edit the configuration file.
#vim CentOS-Base.repo
Replace $ releasever with the version number of the existing system (6)
Vim replacement command
:%s/$releasever/6/g
Exit save
Clear yum Cache
# Yum clean all caches server software package information locally to improve search and installation efficiency # yum makecache
Test
#yum seach vim
Reprinted: http://qingwang.blog.51cto.com/505009/1551228