First: Back up the system comes with the Yum source
List: Readhat The Yum directory on my Computer: ETC/YUM.REPOS.D # Rhel-source.repo
Backup command: MV Rhel-source.repo rhel-source.repo.save #这样就备份成了rhel-source.repo.save
1. Delete Redhat original Yum source
# Rpm-aq | grep Yum|xargs rpm-e--nodeps
2. Download the new Yum installation package
I use the Yum source of CentOS
wget http://mirror.centos.org/centos/6.0/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
wget http://mirror.centos.org/centos/6/os/x86_64/Packages/yum-3.2.29-60.el6.centos.noarch.rpm
wget http://mirror.centos.org/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
3. Install the Yum package
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
The last two packages together, or they will error, there is a dependency between them.
4. Change the Yum source #我们使用网易的CentOS镜像源
cd/etc/yum.repos.d/
wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo
VI Centos6-base-163.repo
Replace all the $releasever in the file with the version number, which is 6 last saved
5. Clean up Yum Cache
# Yum Clean All #
Yum Makecache #将服务器上的软件包信息缓存到本地 to improve the speed of search and install software #
Yum Install vim* #测试域名是否可用
Now: Redhat6 can use CentOS's yum source to install the software online!
RedHat6 using the CentOS Yum Source Update method (for Yum)