1. Delete Redhat original Yum:
Rpm-aq | grep Yum | Xargs rpm-e--nodeps
2. Download Yum Installation components: (depending on the installation version of the machine)
wget http://mirrors.163.com/centos/6.3/os/x86_64/Packages/yum-3.2.29-30.el6.centos.noarch.rpm
wget http:// mirrors.163.com/centos/6.3/os/x86_64/packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http:// mirrors.163.com/centos/6.3/os/x86_64/packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
wget http:/ /mirrors.163.com/centos/6.3/os/x86_64/packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
If you can't download it, you can use the installation package in the CentOS that you downloaded
3. For installation 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-30.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
The last two packages are installed in one piece and will depend on each other
4. Create a new file named Rhel-debuginfo.repo under the/etc/yum.repos.d/folder, and use Gedit to enter the following:
[Base] name=centos-$releasever-base baseurl=http://mirrors.163.com/centos/6.3/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.3/updates/$basearch/gpgcheck=1 gpgkey=http://mirrors.163.com/centos/ Rpm-gpg-key-centos-6 #packages used/produced in the build but not released #[addons] #name =centos-$releasever-addons #b aseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/#gpgcheck =1 #gpgkey =http://mirrors.163.com/ Centos/rpm-gpg-key-centos-6 #additional packages to useful [extras] name=centos-$releasever-extras baseurl=htt p://mirrors.163.com/centos/6.3/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.3/centosplus/$basearch/gpgcheck=1 enabled=0
5.yum Clean All
6. You can also test whether the Yum command is available, or you can use Yum Update to upgrade.
Yum Install vim