1. Uninstall the yum that comes with the system RedHat.
Rpm-Qa | grep Yum | xargs rpm-e-nodeps
2. Download The centos Yum plug-in.
The version number is related to the installed system version, and the 32-bit system is related to the 64-bit system: http://mirrors.163.com/centos/. Of course, you can use the command to directly download to the terminal in linux.
Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/python-iniparse-0.3.1-2.1.el6.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-3.2.29-40.el6.centos.noarch.rpm
Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
Note: In the above address, x86_64 indicates a 64-bit system. If you are a 32-bit system, you should find the version of the corresponding platform. If the download still fails, the minor version may change, you can go to the 163 mirror site to find the exact, complete download, 163 mirror address: http://mirrors.163.com/centos/
3. Install the downloaded Yum package (if you do not have the permission, you can first modify the permission chmod 777 *)
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-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
The last two must be installed together with each other.
4 download profile CentOS6-Base-163.repo
Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
5 modify the CentOS6-Base-163.repo and change $ releasever to the centos version
VI CentOS6-Base-163.repo
: % S/$ releasever/6
6. Put the configuration file in the specified directory and delete the original configuration file.
CD/etc/yum. Repos. DRM-Fr * mV/home/CentOS6-Base-163.repo ./
7. Clear Cache
Yum clean all
8. Configure to retrieve the yum list
Yum makecache
Redhat6.4 replace centos6 Yum and 163 Source