0% found this document useful (0 votes)
324 views

Convert Centos Linux To RHEL Cheat Sheet Red Hat Developer

The document outlines the steps to convert a CentOS Linux system to a Red Hat Enterprise Linux (RHEL) system using the Convert2RHEL tool. The steps include: 1) validating the CentOS version, 2) updating the system, 3) securing packages, 4) downloading the RHEL repository definition, 5) installing Convert2RHEL, 6) running the conversion command and answering prompts, and 7) rebooting the system. After rebooting, /etc/redhat-release should confirm it is now a RHEL 7 system.

Uploaded by

Aa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
324 views

Convert Centos Linux To RHEL Cheat Sheet Red Hat Developer

The document outlines the steps to convert a CentOS Linux system to a Red Hat Enterprise Linux (RHEL) system using the Convert2RHEL tool. The steps include: 1) validating the CentOS version, 2) updating the system, 3) securing packages, 4) downloading the RHEL repository definition, 5) installing Convert2RHEL, 6) running the conversion command and answering prompts, and 7) rebooting the system. After rebooting, /etc/redhat-release should confirm it is now a RHEL 7 system.

Uploaded by

Aa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

developers.redhat.

com redhat-developer @rhdevelopers

Cheat sheet

Convert CentOS Linux to RHEL


Convert2RHEL is a command-line utility that facilitates a smooth migration from CentOS Linux 7 to a fully
supported Red Hat Enterprise Linux (RHEL) operating system.

Convert2RHEL simplifies the process by converting existing CentOS systems to RHEL, ensuring compatibility and a
seamless transition. Because CentOS Linux was derived from RHEL sources, users migrating to RHEL can continue
to use many of the same techniques and elements with minimal training, while also gaining more features, tools,
support, and value.

This cheat sheet outlines the steps to convert a CentOS Linux instance to RHEL using the Convert2RHEL tool.

1. Validate CentOS
Check whether you have a valid CentOS release version:

cat /etc/centos-release

Output:

CentOS Linux release 7.9.2009 (Core)

Switch to root user by using following command

sudo su -

2. Update your system


Check that your system is up to date before starting the conversion.

yum update -y

Output:

Loaded plugins: fastestmirror


Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Resolving Dependencies
—> Running transaction check
—> Package NetworkManager.x86_64 1:1.18.8-1.el7 will be updated
—> Package NetworkManager.x86_64 1:1.18.8-2.el7_9 will be an update
developers.redhat.com redhat-developer @rhdevelopers

3. Secure the packages


Download the signing keys to ensure that we are pulling in only Red Hat created and vetted packages:

curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
https://www.redhat.com/security/data/fd431d51.txt

Copy the SSL certificates from Red Hat Subscription Management, which will allow us to pull packages over a
secure channel:

curl —create-dirs -o /etc/rhsm/ca/redhat-uep.pem


https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem

4. Download the repository definition


Download a repository definition from the Red Hat FTP server to your /etc/yum.repos.d/ directory:

curl -o /etc/yum.repos.d/convert2rhel.repo
https://ftp.redhat.com/redhat/convert2rhel/7/convert2rhel.repo

To verify Convert2RHEL for CentOS 7 is configured for usage run, enter the following:

yum repoinfo convert2rhel-for-rhel-7-rpms

Output:

Loaded plugins: fastestmirror


Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
convert2rhel-for-rhel-7-rpms | 3.8 kB 00:00
(1/3): convert2rhel-for-rhel-7-rpms/updateinfo | 4.3 kB 00:00
(2/3): convert2rhel-for-rhel-7-rpms/primary_db | 4.8 kB 00:00
(3/3): convert2rhel-for-rhel-7-rpms/group | 124 B 00:02
Repo-id : convert2rhel-for-rhel-7-rpms
Repo-name : Convert2RHEL for OS 7
Repo-status : enabled
Repo-revision: 1672752339
Repo-updated : Tue Jan 3 18:55:39 2023
Repo-pkgs : 7
Repo-size : 1.0 M
Repo-baseurl :
https://cdn.redhat.com/content/public/convert2rhel/7/x86_64/os/
Repo-expire : 21,600 second(s) (last: Mon Feb 13 18:06:07 2023)
Filter : read-only:present
Repo-filename: /etc/yum.repos.d/convert2rhel.repo

repolist: 7
developers.redhat.com redhat-developer @rhdevelopers

5. Install convert2rhel
Install the convert2rhel utility:

yum install -y convert2rhel

Output:

Running transaction check


Running transaction test
Transaction test succeeded
Running transaction
Installing : efibootmgr-17-2.el7.x86_64 1/3
Installing : pexpect-2.3-11.el7.noarch 2/3
Installing : convert2rhel-1.1-1.el7.noarch 3/3
Verifying : convert2rhel-1.1-1.el7.noarch 1/3
Verifying : pexpect-2.3-11.el7.noarch 2/3
Verifying : efibootmgr-17-2.el7.x86_64 3/3

Installed:
convert2rhel.noarch 0:1.1-1.el7

Dependency Installed:
efibootmgr.x86_64 0:17-2.el7 pexpect.noarch 0:2.3-11.el7

Complete!

6. Convert to RHEL
Find the organization_id by running this command:

subscription-manager orgs

Use the name of the organization_id in the next step. Begin the conversion by running the following command:

convert2rhel —org <organization_id> —activationkey convert2rhel

You can pass a -y


-y tag to answer yes to all the questions that follow.

Output:

Continue with the system conversion? [y/n]: y

Backing up centos-indexhtml-7-9.el7.centos.noarch.
Successfully downloaded the centos-indexhtml-7-9.el7.centos.noarch package.
Backing up centos-logos-70.0.6-3.el7.centos.noarch.
Successfully downloaded the centos-logos-70.0.6-3.el7.centos.noarch package.
Backing up libreport-centos-2.1.11-53.el7.centos.x86_64.
Successfully downloaded the libreport-centos-2.1.11-53.el7.centos.x86_64
package.
developers.redhat.com redhat-developer @rhdevelopers

Backing up libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64.
Successfully downloaded the
libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64 package.
Removing package: centos-indexhtml-7-9.el7.centos.noarch
Removing package: centos-logos-70.0.6-3.el7.centos.noarch
Removing package: libreport-centos-2.1.11-53.el7.centos.x86_64
Removing package: libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64

7. Reboot
After the conversion is complete, reboot the system:

reboot

Take a look at /etc/redhat-release confirm it is a RHEL 7 server:

cat /etc/redhat-release

Output:

Red Hat Enterprise Linux Server release 7.9 (Maipo)

You might also like