On June 30, 2024, CentOS Linux 7 will reach its end-of-life (EOL), marking the conclusion of official support and security updates. This development has prompted organizations and users relying on CentOS 7 to seek alternative solutions to ensure ongoing security and support. One prevalent and strategic choice is migrating from CentOS 7 to Red Hat Enterprise Linux (RHEL). The transition to RHEL is advantageous for several reasons, including continued access to regular security patches, extended support, and a robust ecosystem of tools and features. By converting to RHEL, organizations can maintain a stable and secure operating environment while aligning with a long-term, commercially supported Linux distribution.
Using Red Hat Insights to convert CentOS 7 to RHEL
In this tutorial, we'll use Red Hat Insights to convert a CentOS 7 system to Red Hat Enterprise Linux. Red Hat Insights continuously analyzes platforms and applications to predict risk, recommend actions, and track costs so enterprises can better manage hybrid cloud environments. Red Hat Insights will be used to perform pre-conversion analysis, remediate issues, and execute the final conversion using Convert2RHEL.
Step 1: Validate CentOS system
To check whether you have a valid CentOS release version, enter the following:
The following output shows that this is a valid version:
CentOS Linux release 7.9.2009 (Core)
Step 2: Update your system
We want our system to be up-to-date before we start the conversion.
sudo yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
--> 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
Step 3: Download and install Red Hat client tools
Red Hat clients tools are required to set up subscription management, collect system information and perform remote configuration updates.
sudo curl -o /etc/yum.repos.d/client-tools-for-rhel-7-server.repo https://ftp.redhat.com/redhat/client-tools/client-tools-for-rhel-7-server.repo
sudo curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://www.redhat.com/security/data/fd431d51.txt
sudo yum install -y subscription-manager insights-client rhc rhc-worker-script
Step 4: Obtain organization ID and activation Key
An activation key is a pre-shared authentication token, allowing authorized users to register and auto-configure systems. This approach enhances security and streamlines automation by executing a registration command with a combination of an activation key and organization ID instead of a username and password.
Within your organization, administrative users can create and oversee activation keys through the Red Hat Hybrid Cloud Console. When an authorized user employs a preconfigured activation key for system registration via the command line, all system-level settings defined in the activation key are seamlessly applied to the system during registration. This simplifies and automates the configuration process for enhanced efficiency.
To get started, simply log in to Red Hat Insights. If you do not already have an account, you must create one first.
Make sure your account has at least one RHEL subscription. A subscription is required for your system to access RHEL content for analysis and conversion. This also unlocks your newly converted system to enable the full features and benefits of RHEL and Insights. If you still need a subscription, a Developer Subscription for Individuals is available at no cost to use RHEL independently (not for an organization).
Navigate to Red Hat Insights > Inventory > System Configuration > Activation Keys to generate a new activation key (Figure 1). Also, make a note of the Organization ID displayed on this page.
Step 5: Register and connect with Red Hat Insights
Remote host configuration (rhc) client is a tool included with RHC that allows RHEL hosts to connect to the Insights services. Run the following command to register the system with Red Hat Insights. Replace
ORG_ID & ACT_KEY with the organization ID and activation key obtained in the previous step.
rhc connect --organization ORG_ID --activation-key ACT_KEY
Upon successful registration the following message will be displayed.
Connecting centos7 to Red Hat.
This might take a few seconds.
* Connected to Red Hat Subscription Management
* Connected to Red Hat Insights
* Activated the Remote Host Configuration daemon
* Enabled console.redhat.com services: remote configuration, insights, remediations, compliance
Successfully connected to Red Hat!
Manage your connected systems: https://red.ht/connector
Verify system information in Red Hat Insights by navigating to Red Hat Insights > Inventory > Systems. Your CentOS system should be listed on this page.
Step 6: Perform pre-conversion analysis using Red Hat Insights
Red Hat Insights provides tools to perform pre-conversion analysis of the CentOS system remotely. This task identifies potential issues and guides you on how to remediate these issues before you convert.
Navigate to Red Hat Insights > Automation Toolkit > Tasks. Click on Run Task under Pre-conversion analysis for converting to RHEL (Figure 2).
You will be asked to choose the CentOS systems for the pre-conversion analysis. Once started, you can monitor the progress in the Activity tab.
The pre-conversion analysis task might take approximately 15 minutes to finish. After completion, carefully review the report and apply the required remediations and verify the system's readiness for conversion (Figure 3). You can rerun the analysis if any changes were made based on the report.
Step 7: Convert the system using Red Hat Insights
The final step is to use the Convert to RHEL from CentOS Linux 7 task provided by Red Hat Insights to execute the conversion process remotely.
Navigate to Red Hat Insights > Automation Toolkit > Tasks. Click Run Task under Convert to RHEL from CentOS Linux 7 (see Figure 4). You will be asked to choose the CentOS systems for the conversion.
Once started, you can monitor the progress in the Activity tab (Figure 5).
Step 8: Verify conversion
Run the following command to verify the system has been converted to RHEL:
The following output shows that this is a valid version:
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Congratulations! You have successfully converted your CentOS server to RHEL server.
Find more resources
Developer Subscription for Individuals is available at no cost to use RHEL independently (not for an organization). In addition, download the latest version of Red Hat Enterprise Linux to perform a clean install.
Convert2RHEL is a command-line utility that analyzes your system’s readiness and converts RPM-based Linux operating systems (OS) to Red Hat Enterprise Linux. It’s an automated way to standardize on Red Hat Enterprise Linux instead of manually redeploying all your workloads.
Red Hat Insights continuously analyzes platforms and applications to predict risk, recommend actions, and track costs so enterprises can better manage hybrid cloud environments.