Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the relationship between CentOS and RHEL of Linux distribution

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Linux distribution CentOS and RHEL relationship is what, for this problem, this article details the corresponding analysis and solutions, hoping to help more want to solve this problem of small partners to find a simpler way.

A few days ago, change the yum source address of RHEL 5.1 to CentOS, yum update, restart, the original red RHEL will become blue CentOS. For this reason, I think that these two Linux distributions must have a very close relationship, and today I checked the documentation, and it turns out that CentOS and RHEL have a very close relationship.

CentOS and RHEL

RHEL comes out in two ways. One is binary distribution and the other is source code distribution.

Either way, you can get it for free (e.g., download it from the web) and republish it. But if you use their online upgrades (including patches) or advisory services, you have to pay.

RHEL has always provided source code distribution methods, CentOS is to RHEL distribution of source code recompiled once, forming a usable binary version. Since LINUX's source code is GNU, everything from getting RHEL's source code to compiling it into a new binary is legal. It's just that REDHAT is a trademark, so you have to remove the REDHAT trademark in the new release. REDHAT's attitude toward this distribution is: "We don't really object to this distribution. The users who really pay us are not interested in the system itself, but in the business services we provide. "So CentOS can get all the features of RHEL, even better software. CentOS does not provide commercial support to users and certainly does not assume any commercial responsibility.

Upgrade from RHEL to CentOS

After RHEL is installed, there is no way to update it online without authorization, that is, you cannot use yum. RHEL without yum will be very difficult to use. This requires an update to RHEL, upgrading the yum source using CentOS.

1. Uninstall rhel yum related packages

List yum-related packages:

# rpm -qa|grep yum

yum-security-1.0.4-3.el5

yum-updatesd-3.0.1-5.el5

yum-rhn-plugin-0.5.2-3.el5

yum-metadata-parser-1.0-8.fc6

yum-3.0.1-5.el5

Unload related packages:

rpm -e yum-3.0.1-5.el5 --nodeps

rpm -e yum-updatesd-3.0.1-5.el5

rpm -e yum-rhn-plugin-0.5.2-3.el5

rpm -e yum-security-1.0.4-3.el5

*** Reserved:

# rpm -qa|grep yum

yum-metadata-parser-1.0-8.fc6

2. Install centos source

First determine the current system version:

# uname -a

Linux st-71 2.6.18-53.1.13.el5 #1 SMP Tue Feb 19 00:19:41 CST 2008 x86_64 x86_64 x86_64 GNU/Linux

Determine Release Version:

# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 5.1 (Tikanga)

So what you need is yum-3.x.el5.centos.5.noarch.rpm for x86_64 for CentOS 5.1

Go to CentOS website to find the nearest address

http://mirror.centos.org/centos/5/os/

If RHEL is an older version, you can find the rpm installation package for yum in the appropriate directory at this address: vault.centos.org/

Find and download locally:

# wget http://centos.ustc.edu.cn/centos/5.1/os/x86_64/CentOS/yum-3.0.5-1.el5.centos.5.noarch.rpm

Installation:

# rpm -ivh yum-3.0.5-1.el5.centos.5.noarch.rpm

Confirm successful installation:

# rpm -qa|grep yum

yum-3.0.5-1.el5.centos.5

yum-metadata-parser-1.0-8.fc6

3. Modify CentOS-Base.repo

Enter the yum source configuration directory:

# cd /etc/yum.repos.d/

By default there is only one file:

# ls

rhel-debuginfo.repo

Add CentOS source configuration:

# vi CentOS-Base.repo

The content is (modify as needed, mainly the version number (5.1) and the number of system digits (x86_64) need to be modified appropriately):

[base]

name=CentOS-5.1 - Base

baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/

gpgcheck=0

gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/x86_64/RPM-GPG-KEY-CentOS-5

#released updates

[updates]

name=CentOS-5.1 - Updates

baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/

gpgcheck=0

gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/x86_64/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released

[addons]

name=CentOS-5.1 - Addons

baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/

gpgcheck=0

gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/x86_64/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

[extras]

name=CentOS-5.1 - Extras

baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/

gpgcheck=0

gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/x86_64/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-5.1 ¨C Plus

baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/

gpgcheck=0

gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/x86_64/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users

[contrib]

name=CentOS-5.1 - Contrib

baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/

gpgcheck=0

gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/x86_64/RPM-GPG-KEY-CentOS-5

4. test

retry performing update: # yum update

About the Linux distribution CentOS and RHEL relationship is how the answer to the question is shared here, I hope the above content can be of some help to everyone, if you still have a lot of doubts not solved, you can pay attention to the industry information channel to learn more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report