RHEL5.3 you can use CentOS5.3 to update the source

Source: Internet
Author: User
RHEL is a very stable Linux release and a leading product in the industry. It is precisely because of its conservative applications that many beginners can hardly adapt to. The biggest problem is the installation of software. Although the YUM tool is very convenient, only users registered with RHN can truly enjoy the VIP level and simple installation operations. Although it is also a way to create a local YUM update library, after all, it cannot be the same as RHN. It is said that the CentOS source code is synchronized with RHN, and CentOS, as a fellow brother of RHEL source code re-compilation

RHEL is a very stable Linux release and a leading product in the industry. It is precisely because of its conservative applications that many beginners can hardly adapt to. The biggest problem is the installation of software. Although the YUM tool is very convenient, only users registered with RHN can truly enjoy the VIP level and simple installation operations. Although it is also a way to create a local YUM update library, after all, it cannot be the same as RHN.

It is said that the CentOS source code is synchronized with RHN, and CentOS, as a fellow brother of RHEL source code re-compilation, so many people are wondering if they can set RHEL updates to the CentOS source? Yes, of course. Because CentOS is actually a re-compiled RHEL, almost everything is the same. It will not be discussed here as to which one is more worth choosing. Here I want to talk about how to make RHEL5 use the CentOS update source.

First, introduce your environment: RHEL5.3

Source of Huazhong University of Science and Technology: http://centos.ustc.edu.cn/CentOS-Base.repo.5

To use the CentOS source, you must remove or disable the RHEL update source and delete the YUM tool that comes with RHEL5.

# Cd/etc/yum. repos. d

# Mv rhel-debuginfo.repo rhel-debuginfo.repo.bak

Back up the data for accidental recovery. If any other source settings are available, delete the data or back up the data using the preceding methods.

Delete the YUM and YUM components that come with RHEL5

Use rpm-qa | grep yum to list all related packages and delete them. If dependency cannot be deleted, use the-nodeps parameter to delete them.

You can set the CentOS source as follows:

First, we need to download and install the CentOS YUM tool using the following two packages:

I will directly go to rpm and will not download it.

# Rpm-ivh http://centos.ustc.edu.cn/centos/5.3/ OS /i386/CentO/yum-3.2.19-18.el5.centos.noarch.rpm-nodeps

# Rpm-ivh http://centos.ustc.edu.cn/centos/5.3/ OS /i386/CentOS/yum-metadata-parser-1.1.2-2.el5.i386.rpm-nodeps

After the YUM tool is installed, you can set the YUM source. Currently, the fastest source in China is the University of Science and Technology of Chinese Science and Technology. If you want to choose another one, it's a matter of opinion and wisdom...

Download the source configuration file:

# Wget http://centos.ustc.edu.cn/CentOS-Base.repo.5

# Mv CentOS-Base.repos.5/etc/yum. repos. d/CentOS-Base.repo

In this configuration file, you need to modify it in some places. Otherwise, you cannot connect to the server for updates. The variable -- $ releasever indicates the system version number, this article is based on version 5.3, so you need to replace all the variable names in the configuration file with 5.3. Here we will use a sed syntax

# Vim/etc/yum. repos. d/CentOS-Base.repo

: 1, % s/$ releasever/5.3/g

Save and exit. In this case, RHEL5.3 solves the problem of using the CentOS source. However, there is a point that needs to be mentioned. The solutions written by many experts on the internet end with an upgrade using the configured source, such as # yum update.

What I want to say is, if you like the RHEL interface and appearance, don't try it lightly. Otherwise, you will regret it, this will make your system the same as CentOS, but keep the original kernel, but it is not used as the default startup item... That is, it is equivalent that you have installed an RHEL5.3 kernel in centos5.3. Although the two kernels are the same, it is not against the intention to separate them due to different names?

Therefore, if you do not mind this, please do not be lazy, need to upgrade, or need to install which software to operate, this is also the purpose of setting this source.

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.