1. Delete Redhat's original Yum
# rpm-aq|grep Yum|xargs rpm-e--nodeps
2. Download the Yum installation source
#wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-69.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-30.el6.noarch.rpm
#wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
3. Install 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-69.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
4. Update the Repo file
Cp/etc/yum.repos.d/rhel-source.repo/etc/yum.repos.d/rhel-source.repo.bak
Vi/etc/yum.repos.d/rhel-source.repo
The contents are:
[Base]
name=centos-$releasever-base
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
Gpgcheck=1
Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6
#released Updates
[Updates]
name=centos-$releasever-updates
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
Gpgcheck=1
Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6
#packages used/produced in the build and not released
#[addons]
#name =centos-$releasever-addons
#baseurl =http://mirrors.163.com/centos/$releasever/addons/$basearch/
#gpgcheck =1
#gpgkey =http://mirrors.163.com/centos/rpm-gpg-key-centos-6
#additional packages that could be useful
[Extras]
name=centos-$releasever-extras
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
Gpgcheck=1
Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6
#additional packages that extend functionality of existing packages
[Centosplus]
name=centos-$releasever-plus
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
Gpgcheck=1
Enabled=0
5. Updating the system
# yum Update-y
This article is from the "7529372" blog, please be sure to keep this source http://7539372.blog.51cto.com/7529372/1744768
Install Yum and update link to CentOS under redhat6.5 empty system