1.Uninstall RedHat`s yum and python-urlgrabber
#yum rpm -aq | grep yum | xargs rpm -e --nodeps(Notice'two -')
#yum rpm -aq | grep python-urlgrabber | xargs rpm -e --nodeps
2.download dependency of yum and yum files
#wget http://http://mirrors.163.com/centos/6/os/x86_64/Packages/<a target=_blank href="http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm">python-urlgrabber-3.9.1-11.el6.noarch.rpm</a> (python-urlgrabber)
<pre name="code" class="python">#wget http://http://mirrors.163.com/centos/6/os/x86_64/Packages/<a target=_blank href="http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm">yum-3.2.29-73.el6.centos.noarch.rpm (yum source)</a>
#wget http://http://mirrors.163.com/centos/6/os/x86_64/Packages/<a target=_blank href="http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm">yum-metadata-parser-1.1.2-16.el6.x86_64.rpm</a> (yum-metadata)
#wget http://http://mirrors.163.com/centos/6/os/x86_64/Packages/<a target=_blank href="http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm">yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm</a> (yum-plugin)
3. Install those yum`s files
#rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
#rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
4.Remove yum configure files *.repo
#rm /etc/yum.repos.d/*
5.Edit Base.repo file
#vi /etc/yum.repos.d/Base.repo
---------Base.repo file info---------------
#CentOS-Base.repo
#
# The mirror system uses the connnecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist=does not work for you, as a fall back you can try the
# remarked out baseurl = line instead.
#
[base]
name=CentOS-6.5 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
# mirrorlist = http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.163.com.centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
# [released updates]
[updates]
name=CentOS-6.5 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
# mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=updates
gpgcheck=1
# gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
# additional packages that maybe useful
[extras]
<pre name="code" class="html">name=CentOS-6.5 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
# mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=extras
gpgcheck=1
# gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
# additonal packages that extend functionality of existing packgaes
[centosplus]
<pre name="code" class="html">name=CentOS-6.5 - Plus - 163.com
<pre name="code" class="html">baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
# mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=centosplus
<pre name="code" class="html">gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.org/centos/RPM-GPG-KEY-CentOS-6
# contrib - packages by Centos Users
[contrib]
<pre name="code" class="html"><pre name="code" class="html">name=CentOS-6.5 - Contrib - 163.com
<pre name="code" class="html">baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
# mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=contrib
<pre name="code" class="html">gpgcheck=1
enabled=0
#gpgkey=http://mirrors.163.org/centos/RPM-GPG-KEY-CentOS-6
6.yum clean
#yum clean all
7.MakeCache
#yum makecacke
8.update yum
#yum update
This is all!!! Have Fun.....