We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – How To Convert CentOS 8 To RHEL 8 Server

Learn how to – How To Convert CentOS 8 To RHEL 8 Server.

Welcome to this guide on how to convert CentOS 8 To RHEL 8 Server. If you have been wondering what to do with your CentOS system after the announcement of the end of life for the CentOS distro then we got you covered. You can easily migrate your CentOS 8 system to RHEL 8 with the aid of this guide.

With Convert2RHEL, an officially supported utility, you can easily migrate your RPM-based Linux distribution to Red Hat Enterprise Linux without manually deploying your workloads. As part of the migration, you can identify compatibility issues and maintain customizations and configurations thus reducing the administrative burden.

Below are two methods of how you can access/ subscribe to RedHat packages

  • Red Hat CDN
  • Satellite through RHSM

There are two ways of registering and subscribing to your CentOS 8 system during the conversion.

  • By providing the organization ID and activation keys. This method is used when you want to access the RedHat packages using satelite through RHSM.
  • By providing the username, password and Pool ID. This is applicable for users who want to access the packages via Red Hat CDN.

Getting Started with the conversion

Before we begin on the conversion, ensure that you have a backup for important files.

Once the backup has been taken and verified that you can restore it, procced and check the CentOS version.

$ cat /etc/centos-release
CentOS Linux release 8.2.2004 (Core) 

Ensure you have root access to the system.

sudo su

Step 1 – Prepare CentOS 8 for RHEL 8 Conversion

Convert2rhel is the utility tool that we are going to install and use to convert our CentOS 8 system to RHEL 8. First, download the RedHat GPG key.

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

Download the SSL certificate for the server which contains the Convert2RHEL repo.

sudo curl --create-dirs -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem

Now add the Convert2RHEL YUM repositories on CentOS 8.

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

Finally, we are set to install Convert2RHEL on our CentOS 8 system using the YUM command below.

sudo yum -y install convert2rhel

Since Convert2rhel is written in python, Python will be installed as below.

.........
Installed:
  convert2rhel-0.24-2.el8.noarch                                                
  libevent-2.1.8-5.el8.x86_64                                                   
  libmodulemd-2.9.4-2.el8.x86_64                                                
  python3-pexpect-4.3.1-3.el8.noarch                                            
  python3-pip-9.0.3-19.el8.noarch                                               
  python3-ptyprocess-0.5.2-4.el8.noarch                                         
  python3-setuptools-39.2.0-6.el8.noarch                                        
  python3-unbound-1.7.3-15.el8.x86_64                                           
  python36-3.6.8-2.module_el8.4.0+790+083e3d81.x86_64                           
  unbound-libs-1.7.3-15.el8.x86_64                                              
  yum-utils-4.0.18-4.el8.noarch                                                 

Complete!

Remember that to perform a conversion, you must have the latest version of Convert2rhel installed on your system. If you have an older version installed, you are required to remove it and install the latest version.

For Satellite environment

Also remember, if you are accessing the RHEL packages through Satelite, you are required to download the katello-ca-consumer RPM to the /usr/share/convert2rhel/subscription-manager/ directory using the command.

sudo curl --insecure --output /usr/share/convert2rhel/subscription-manager/katello-ca-consumer-latest.noarch.rpm https://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm

In the code above, replace satellite.example.com with the hostname of your server.

Step 2 – Convert CentOS 8 to RHEL 8 Server

Now that we have prepared our CentOS 8 for the conversion, we are set to proceed as below. As outlined earlier, there are two methods of subscribing to the conversion. i.e using the organization ID and activation keys and using the username, password, and pool ID.

If you are using the organization ID and activation key, ensure that you have created an activation key in the satellite to automatically attach your subscriptions. See Managing activation keys for more elaboration.

Update your CentOS 8 software to the latest stable versions.

sudo dnf update -y

After the upgrade check your updated CentOS version

$ cat /etc/centos-release
CentOS Linux release 8.4.2105

Check the kernel version.

$ uname -r 
4.18.0-193.el8.x86_64

Reboot your system and proceed with root privileges.

sudo reboot now

2.1 – Convert CentOS 8 to RHEL 8 Server with Organization ID and activation key.

If you have the Organization ID and activation key, you will convert your CentOS 8 system to RHEL 8 using the command with the syntax below.

sudo convert2rhel --org organization_ID --activationkey activation_key

In the command, replace organization_ID with your organization ID and activation_key from the Red Hat Customer Portal if you are using RedHat CDN or RedHat satellite from the web UI. For example:

sudo convert2rhel --org testOrg --activationkey RHEL8_Server

In the command, my organization ID is testOrg and the activation key is RHEL8_Server.

2.2 – Convert CentOS 8 to RHEL 8 Server with Username, Password, and pool ID.

For those using this option, the syntax of the command is as below.

# Username and Password to be prompted
sudo convert2rhel --auto-attach --username=USERNAME --password='PASSWORD'

# Passing both username and password in command line
sudo convert2rhel --auto-attach --username=USERNAME --password='PASSWORD'

In the command, replace USERNAME with your RedHat account username, PASSWORD with your RedHat account password, and pool_ID with the subscription pool to attach to your system.

For the purpose of this guide, I will use the second option where I’ll provide the username without the password and pool ID(will provide later)

convert2rhel --username learnhowto 

Regardless of the method used either the first or second option, the process will still proceed as below.

Read through the License Terms and proceed as below to see the tasks done by the system in preparation for the migration.

A backup system will be prepared as below.

After going through all the tasks, agree for the system to continue with the conversion.

In the next prompt provide a password for the provided RHEL account.

The listed tasks will be done as below.

Select the subscription type from the two given options, either the RedHat individual subscription or the Enterprise subscription. I’ll go for 1.

Now all the required packages will be installed and the system is set for the conversion. Enter ‘y’ for the conversion to proceed.

Then the system will make the final system check before commencing the conversion.

Sit back and wait for the conversion process to complete. Once done, you will see this.

After a successful conversion, reboot your system.

sudo reboot now

Step 3 – Post tasks after converting CentOS 8 to RHEL 8

It is so amazing how we have converted our system from CentOS 8 to RHEL 8. When the system reboots, confirm that your system is running RedHat Enterprise Linux 8 as below.

$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.4 (Ootpa)

Check the Kernel version.

$ uname -r
4.18.0-305.19.1.el8_4.x86_64

This proves that we have successfully migrated our CentOS 8 to RHEL 8. You can now set your hostname to a preferred name.

hostnamectl set-hostname rhel8.ownyourlife.com.ng

Conclusion.

That marks the end of this amazing guide. I hope you too managed to convert CentOS 8 To RHEL 8 Server.

Interested in more?

Cart

Your Cart is Empty

Back To Shop