How to Use CentOS to update yum source in RHEL5

Source: Internet
Author: User
Today, I started my job on the first day. The new company's server uses RHEL. I personally don't like RHEL very much. I still don't have to work. Khan received a request to install several software packages, I used to use yum in CentOS, but it is not easy to use RHEL update packages. Although there are a lot of information on the Internet, I will do it myself after practice, the following is a summary of the practical results tonight: 1. Uninstall the yum package in the system [root @ localhost ~] # Rpm-qa | grepyumyum-3

Today, I started my job on the first day. The new company's server uses RHEL. I personally don't like RHEL, so I still have to work.

I received a request to install several software packages. I used to use yum in CentOS, but it is not easy to use RHEL update packages. Although there is a lot of information on the Internet, but what we will do after practice is our own. The following is a summary of our practical achievements tonight:

1. Uninstall the yum package in the system

[Root @ localhost ~] # Rpm-qa | grep yum

Yum-3.2.8-9.el5

Yum-rhn-plugin-0.5.3-6.el5

Yum-metadata-parser-1.1.2-2.el5

Yum-security-1.1.10-9.el5

Yum-updatesd-0.9-2.el5

[Root @ localhost ~] # Rpm-qa | grep release

RedHat-release-notes-5Server-12

Redhat-release-5Server-5.2.0.4

Run the rpm-e packges command to uninstall these software packages. If there is dependency, run the -- nodeps parameter.

Ii. Download the yum package in CentOS

# Cd/& mkdir yum & cd yum

Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-3.2.22-33.el5.centos.noarch.rpm

Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm

Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm

Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/centos-release-5-6.el5.centos.1.i386.rpm

Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/centos-release-notes-5.6-0.i386.rpm

Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm

Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm

Then install these software packages. We recommend that you install these software packages together. If you encounter this problem and depend on your own software package, I use the -- nodeps parameter.

Example: rpm-ivh centos-release-5-6.el5.centos.1.i386.rpm -- nodeps

3. Finally, download the configuration file

Wget http://sudone.com/download/CentOS-Base.repo-O/etc/yum. repos. d/CentOS-Base.repo

Cd/etc/yum. repos. d/

Use the vim editor to edit the CentOS-Base.repo for replacement

: 1, $ s/$ releasever/5.5/g (Note: My system is 5.5, so here I change to 5.5)

4. import key

Rpm -- import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

Finally, test yum-y install httpd.

OK.

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.