CentOS 7 EOL on 30 June: what should you do now?

CentOS 7 reaches end of life on 30 June 2024 – barely six weeks are left until the CentOS 7 EOL (end of life) date. After that, no more security fixes or bug fixes will be released for it, but the servers will keep running just as before. That is what makes it dangerous: nothing forces you to act; every new vulnerability simply stays open.

For ten years, CentOS 7 was one of the most widely used server Linux distributions, especially for web hosting and cPanel servers. In this article we sum up what happens on 30 June and which paths you can choose from.

What expires on 30 June?

The maintenance period of Red Hat Enterprise Linux 7, of which CentOS 7 was the free rebuild, also ends on the same day. From then on:

  • there are no more security updates for the kernel, OpenSSL, OpenSSH and the other packages;
  • software vendors (control panels, monitoring agents, backup programs) are phasing out CentOS 7 support one after another;
  • in the case of CentOS 8, the contents of the repositories were moved to the archive at vault.centos.org a few weeks after end of life and disappeared from the mirrors. If the same happens with CentOS 7, yum install and yum update will fail with an error.

If you previously switched from CentOS 8 to CentOS Stream 8, it’s even more urgent: support for Stream 8 already ends on 31 May 2024.

First: an inventory

Before you decide, you need to know how many machines are involved and what runs on them. On a single machine:

cat /etc/centos-release
hostnamectl

If you manage your servers with Ansible, a single command gives you the distribution and version of every machine:

ansible all -m setup -a 'filter=ansible_distribution*'

For each machine, note its role (web, database, email, internal application), whether it is reachable from the internet, and which external repositories (EPEL, Remi, vendor repositories) you installed packages from. These determine which path is feasible.

The options

Solution How much work? Good until when? When to choose it?
In-place upgrade to AlmaLinux 8 or Rocky Linux 8 (ELevate) Medium Until 2029 If the machine is hard to rebuild and the software runs on EL8
Fresh installation (AlmaLinux 9, Rocky Linux 9, Debian 12, Ubuntu 24.04) and migration More Until 2029–2032 We recommend this for most servers
Switch to RHEL with Extended Life Cycle Support (ELS) Little, but paid RHEL 7 ELS: 30 June 2028 If you need to buy time and you need Red Hat support anyway
Extended support bought from a third party Little, but paid Depends on the provider If the migration definitely won’t fit in before 30 June
Isolation, then decommissioning Little Temporarily If you want to shut down the machine anyway

In-place upgrade with ELevate

ELevate, developed by AlmaLinux, is built on Red Hat’s Leapp tool and upgrades from CentOS 7 to an EL8-based system: AlmaLinux 8, Rocky Linux 8 or Oracle Linux 8. The process for upgrading from CentOS 7 to AlmaLinux 8:

sudo yum update -y && sudo reboot

sudo yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm
sudo yum install -y leapp-upgrade leapp-data-almalinux

sudo leapp preupgrade
# review /var/log/leapp/leapp-report.txt and fix the blocking issues
sudo leapp upgrade
sudo reboot

leapp preupgrade doesn’t change anything; it only produces a report. On a default installation it almost always finds a few blocking issues (old kernel modules, the root SSH login setting, packages to be removed), and these have to be fixed one by one based on the report. Disable Secure Boot for the duration of the upgrade.

We only recommend ELevate if rebuilding the machine is very difficult. After the upgrade you will have an EL8 system, which will have to be upgraded again to EL9 in a few years, and the settings and packages accumulated over ten years come along with it. Be sure to make a full backup first, and try out the process on a copy of the machine.

Fresh installation and migration

The cleanest path is a new server with AlmaLinux 9 or Rocky Linux 9 (or, if you don’t need RHEL compatibility, Debian 12 or Ubuntu 24.04), and moving the services over. It’s more work, but the old machine stays as a fallback until the move is finished, and you get a fresh system supported until 2032.

Bear in mind that CentOS 7 contains very old software versions: PHP 5.4, Python 2.7, OpenSSL 1.0.2, MariaDB 5.5. An old application may not run unchanged on a modern system, so you also need to plan for updating the application. If you can’t solve this quickly, the old PHP or Python application can also be packaged into a container, so that at least the operating system underneath can be up to date.

Extended support

At the end of April, Red Hat announced that Extended Life Cycle Support (ELS) can be bought for RHEL 7.9 for four years, until 30 June 2028. A CentOS 7 machine can be converted in place to RHEL 7 with the convert2rhel tool, but this requires a RHEL subscription and the ELS add-on.

Third parties also offer extended security updates directly for CentOS 7, for example TuxCare (until 2028). These are good for buying time, but they are no substitute for migration: they only provide security fixes and don’t solve the problem of the applications and the old software versions.

cPanel servers on CentOS 7

cPanel & WHM LTS version 110 is the last one that runs on CentOS 7 and CloudLinux 7; newer versions are only available on newer, EL8-based systems and on Ubuntu. cPanel’s own ELevate variant is built around AlmaLinux ELevate, and upgrades the server from CentOS 7 to AlmaLinux 8 or from CloudLinux 7 to CloudLinux 8: it removes cPanel, the EasyApache packages and the database server before the upgrade, and reinstalls them afterwards. According to cPanel, the upgrade takes 30–90 minutes, and during this time the server’s services don’t work properly, so for a production hosting server a full backup and a maintenance window are essential here too.

Many hosting providers instead install a new server with AlmaLinux 8 or CloudLinux 8 and move their customers over account by account with WHM’s Transfer Tool. This is slower, but it can be scheduled customer by customer and doesn’t involve one big, shared outage. We wrote about the move to CloudLinux in detail in an earlier article.

If you don’t finish by 30 June

If you can’t make the switch by the deadline, at least reduce the risk: cut the machine off from the internet as far as possible (only the necessary ports, only from the necessary addresses), put it in a separate network segment, and make regular, verified backups of it. We wrote more about strategies for handling end-of-life systems in this article, and about the situation of the Red Hat clones in our article on the changes around the RHEL source code.

We help with assessing CentOS 7 servers, upgrading them with ELevate and moving them to a new system, including cPanel and CloudLinux servers; you can read more about this on the Infrastructure and operations and For hosting providers pages.

Let’s talk about your project

Tell us briefly how we can help, and we will get back to you as soon as we can.

Get in touch