Site icon CentLinux

How to migrate CentOS 8 to Redhat

Share on Social Media

Learn how to seamlessly migrate CentOS 8 to RedHat Enterprise Linux (RHEL). Follow this step-by-step guide to ensure a smooth and successful transition. #centlinux #linux #centos

Problem Definition

Due to the demise of CentOS Linux 8, the system administrators are now looking for alternatives to migrate your existing CentOS Linux server machines.

We have already published a list of CentOS 8 alternatives and also wrote an article to migrate CentOS 8 to CentOS Stream.

Now, we are showing the steps to migrate a existing CentOS Linux server to Red Hat Enterprise Linux (RHEL) operating system. Because Red Hat is now offering free one year subscription for upto 16 servers. Therefore, you can migrate to RHEL 8 and enable the official yum repositories by registering your Linux server with Red Hat subscription manager.

Recommended Online Training: Learn Bash Shell in Linux for Beginners

Check your CentOS Linux Server

Use a ssh client and login to your CentOS 8 server as root user.

Check the current Linux Kernel and operating system versions.

# uname -r
4.18.0-240.1.1.el8_3.x86_64

# cat /etc/redhat-release
CentOS Linux release 8.3.2011

Install Convert2RHEL Utility

We recommend that you should use Convert2RHEL utility for this migration process. Convert2RHEL is simple tool that can convert your existing CentOS Linux or Oracle Linux operating systems to Red Hat Enterprise Linux (RHEL) 8.

Currently, Convert2RHEL supports migration from CentOS/Oracle Linux 6,7,8 to RHEL 8.

Based on the version of your Linux distro, you can download and install the supported package of Convert2RHEL software. The download URLs are available at Convert2RHEL GitHub page.

Since, we are using CentOS Linux 8 in this article, therefore we are installing the respective Convert2RHEL package by using dnf command.

# dnf install -y https://github.com/oamg/convert2rhel/releases/download/v0.17/convert2rhel-0.17-1.el8.noarch.rpm
Install Convert2RHEL Utility

Convert2RHEL is written in Python, therefore it also installs Python programming language support herewith.

Update your CentOS Linux software packages to the latest stable versions by using dnf command.

# dnf update -y

After update, check the Linux kernel and operating system versions again.

# uname -r                       
4.18.0-240.1.1.el8_3.x86_64

# cat /etc/redhat-release        
CentOS Linux release 8.3.2011

Reboot your Linux OS with the updated Kernel.

# reboot

Migrate CentOS 8 to Redhat Linux

After reboot, login as root user and start the migration process by using the Convert2RHEL utility. You will need your Red Hat login credentials to register your Linux server after migration to RHEL 8.

# convert2rhel --username centlinux
Migrate CentOS 8 to Redhat Linux

First of all convert2rhel is obtaining a confirmation from user to execute the script.

Convert2RHEL Package Removal Warning

Some software packages will be removed by the script, and it is asking for the confirmation.

Convert2RHEL – Choose Redhat Supscription

Choose your preferred Red Hat Subscription from the list.

Executing Convert2RHEL

Some more software packages will be removed by the convert2rhel script.

Convert2RHEL – Patch Yum Configuration File

The script is patching the yum configuration file.

Convert2RHEL – Finish CentOS 8 Migration

Finally, convert2rhel script has been completed successfully.

After successful execution of Convert2RHEL utility, you need to restart your Linux server to boot your operating system with the new RHEL 8 Kernel.

# reboot

After reboot, check the Linux kernel and operating system versions.

# uname -r
4.18.0-240.15.1.el8_3.x86_64

# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.3 (Ootpa)

Your CentOS Linux server has been migrated to RHEL 8.

Change the hostname of your Linux server, if required.

# hostnamectl set-hostname rhel-8.centlinux.com

If you faced difficulty in understanding the above article, we recommend that you should buy and read RHCSA Red Hat Enterprise Linux 8 (UPDATED): Training and Exam Preparation Guide (EX200), Second Edition (PAID LINK) by Asghar Ghori.

Final Thoughts

In conclusion, migrating from CentOS 8 to Red Hat Enterprise Linux (RHEL) can significantly enhance the stability, support, and performance of your server environment. By following a systematic approach, you can ensure a smooth and successful transition with minimal downtime and disruption.

For personalized assistance and expert guidance on migrating CentOS 8 to RHEL, check out my Fiverr gig Linux Server Administrator. I offer comprehensive migration services to help you achieve a seamless and efficient transition, tailored to your specific needs and requirements. Enhance your server infrastructure with professional support for a worry-free migration experience.

Exit mobile version