Steps to install CentOS yum in Rhel

Source: Internet
Author: User
Tags gpg

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.