1. Delete Redhat's original Yum
Rpm-aq|grep Yum|xargs rpm-e--nodeps
2. Download the Yum installation file
Note that if you cannot find the file when you download it, log on to: http://mirrors.163.com/centos/6/os/x86_64/to find the appropriate file. And then download it again.
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-14.1.el6.x86_64.rpm
RPM-IVH yum-3.2.27-14.el6.centos.noarch.rpm um-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
Note that the last two packages must be installed at the same time, otherwise they will depend on each other
----------Configuration NetEase Source
4. Update the Repo file
Mv/etc/yum.repos.d/rhel-debuginfo.repo/etc/yum.repos.d/rhel-debuginfo.repo.repo.bak
Vi/etc/yum.repos.d/rhel-debuginfo.repo
The contents are:
[Base]name=centos-5-base#mirrorlist=http://mirrorlist.centos.org/?release= $releasever 5&arch= $basearch &repo=os#baseurl =http://mirror.centos.org/centos/$releasever/os/$basearch/Baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/gpgcheck=0Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5#released Updates[update]name=centos-5-updates#mirrorlist=http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=updatesBaseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/gpgcheck=0Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5#packages used/producedinchThe build but not released[addons]name=centos-5-addons#mirrorlist=http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=addonsBaseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/gpgcheck=0Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5#additional Packages that could be useful[extras]name=centos-5-extras#mirrorlist=http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=extrasBaseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/gpgcheck=0Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5#additional packages that extend functionality of existing Packages[centosplus]name=centos-5-plus#mirrorlist=http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=centosplusBaseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/gpgcheck=0enabled=0Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5#contrib-packages by Centos Users[contrib]name=centos-5-contrib#mirrorlist=http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=contribBaseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/gpgcheck=0enabled=0Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5#VIDag.repo[dag]name=dag RPM Repository forRhel5baseurl=http://ftp.riken.jp/linux/dag/redhat/el5/en/$basearch/dag/Enabled=1Gpgcheck=0Gpgkey=http://Ftp.riken.jp/linux/dag/packages/rpm-gpg-key.dag.txt
Import Key
[Email protected] ~]# rpm--import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
Redhat 6 Configuring the Yum source