How to install centos 5 yum in rhel5

Source: Internet
Author: User
For those who often use centos, the yum that comes with it is very useful. Can their fellow brother rhel5 also install yum? I found a piece of information on the Internet and found that this is completely achievable. Let's take a look at his implementation method: Uninstall the yum package of yum in RHEL first. Query the previously installed Yum package: Rpm-Qa | grep yum

According to the above query, delete the yum package one by one, here some are dependent, so to add -- nodeps to delete it, such as: rpm-e -- nodeps yum-3.0.5-1.el5 and so on.

### 1. Create the yum installation package directory and enter the directory mkdir/tmp/Yum-packagescd/tmp/Yum-packages.
### 2. Download all RPM packages required by Yum: wget OS /i386/CentOS/yum-3.2.22-26.el5.centos.noarch.rpmwget OS /i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpmwget OS /i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm wget OS /i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
### 3. Install Python environment first: rpm-IVH python-iniparse-0.2.3-4.el5.noarch.rpm
### 4. Install all Yum packages: rpm-IVH yum-3.2.22-26.el5.centos.noarch.rpm yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
### 5. Download the configuration file wget repos. d/CentOS-Base.repo (here, only in/etc/yum. repos. d/folder with the suffix. the repo file can be a newly added Yum source file in the yum source format, so the yum source file you can find can be placed here, with the yum source, it is quite easy to install and update the software. You can add the yum source file to obtain the files written on the Internet in the following way. repo file: wget After that, change the name to a specific one)
### 6. Now you can use Yum to experience Yum update and re-run: RHEL 5.3 uses the yum source of centos 5.3 to update and install the software

# Check the built-in Yum package

[Root @ NS ~] # Rpm-Qa | grep yum


# Uninstall all software packages starting with yum

[Root @ NS ~] # Rpm-e -- nodeps Yum-metadata-parser

[Root @ NS ~] # Rpm-e -- nodeps yum

[Root @ NS ~] # Rpm-e -- nodeps Yum-updatesd

[Root @ NS ~] # Rpm-e -- nodeps Yum-RHN-plugin

[Root @ NS ~] # Rpm-e -- nodeps Yum-Security

[Root @ NS ~] # Rpm-e -- nodeps Yum-metadata-parser

# Download and install the two software packages of HKUST. It is said that the yum source of HKUST is the fastest, and the specific path is adjusted according to the actual situation.

Wget OS /i386/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm

Wget OS /i386/CentOS/yum-metadata-parser-1.1.2-2.el5.i386.rpm

Rpm-IVH yum-metadata-parser-1.1.2-2.el5.i386.rpm

Rpm-IVH -- nodeps yum-3.2.19-18.el5.centos.noarch.rpm

# Download the yum configuration file of HKUST

[Root @ NS ~] # Cd/etc/yum. Repos. d/

[Root @ NS ~] # Wget

[Root @ NS ~] # Mv CentOS-Base.repo.5 CentOS-Base.repo

# Modify Yum Configuration File Content

Replace the entire file in the VI Editor, save and exit.

: 1, $ S/$ releasever/5.3/g


# Updating the yum library will not prompt for updating the installed software package, which will lead to loss of some original settings, such as modification to the xmanger configuration file, therefore, you need to reset the environment after the update.

[Root @ NS ~] # Yum-y update



You can also refer to the following website:
Http:// OS
Http:// OS
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: 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.