Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Convert CentOS Linux to RHEL using Red Hat Insights

January 22, 2024
Nikhil Mungale
Related topics:
Linux
Related products:
Red Hat Enterprise LinuxRed Hat Insights

Share:

     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:

    cat  /etc/centos-release

    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
    
    sudo reboot

    The 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

    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.

    Key activation
    Figure 1: Key activation.

    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. 

    task run
    Figure 2: Pre-conversion analysis.

     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.

    task run
    Figure 3: Results of conversion analysis.

    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.

    convertion task
    Figure 4: Starting the conversion.

     Once started, you can monitor the progress in the Activity tab (Figure 5).

    convertion complete
    Figure 5: CentOS to RHEL conversion completed.

    Step 8: Verify conversion

    Run the following command to verify the system has been converted to RHEL:

    cat  /etc/redhat-release

    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.  

    Last updated: March 20, 2025

    Related Posts

    • How to use Convert2RHEL to migrate CentOS to RHEL

    • Red Hat Enterprise Linux 9.3: Top features for developers

    • Getting started with RHEL on WSL

    • Secure RHEL systems using Ansible Automation Platform

    • How custom SELinux policies secure servers and containers

    • How to install Java 17 and 21 on Red Hat Enterprise Linux 8

    Recent Posts

    • GuideLLM: Evaluate LLM deployments for real-world inference

    • Unleashing multimodal magic with RamaLama

    • Integrate Red Hat AI Inference Server & LangChain in agentic workflows

    • Streamline multi-cloud operations with Ansible and ServiceNow

    • Automate dynamic application security testing with RapiDAST

    What’s up next?

    Red Hat Insights API

    This cheat sheet shows you how to get actionable intelligence using Red Hat Insights APIs so you can identify and address operational and vulnerability risks in your Red Hat Enterprise Linux environments before an issue results in downtime.

    Get the cheat sheet
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue