New Customers: 50% OFF Your First Month on All VPS Servers & Web Hosting Plans!

Choosing your replacement for CentOS 7

CentOS 7 reached end of life in June 2024. This guide compares AlmaLinux 9, Rocky Linux 9 and Ubuntu 24.04 LTS as replacements, explains which offers the least change to your workflows, and walks you through safe migration strategies including fresh deployment or stepped in-place upgrades.

Rhys CallowayLinux VPS, servers, security and the command line 9 min read Updated 23 Sep 2026 AlmaLinux 9, Ubuntu 24.04

This picks up from a server you can already reach over SSH.

If you want the least disruption from CentOS 7, move to an Enterprise Linux 9 clone. AlmaLinux 9 or Rocky Linux 9 feel most familiar and keep your tooling. If you run cPanel, choose AlmaLinux 9 because cPanel deprecated Rocky support in 2026. Ubuntu 24.04 LTS is a solid alternative with the longest security horizon through paid options, but you will change more of your workflows.

Before you start

  • CentOS 7 reached end of life on 30 June 2024. The CentOS Project no longer ships security updates. Staying on it increases your risk and compliance burden.
  • Plan your path. A direct in-place upgrade from CentOS 7 to EL9 is a bad idea. It is unsupported and can leave the system unbootable or inconsistent. If you must do in place, the supported route is CentOS 7 to EL8, then EL8 to EL9, using AlmaLinux ELevate and Leapp checks between each major step.
  • Safer pattern at Hostworld. Create a new VPS in our Virtualizor panel with the target OS, move services and data, then retire the old server. You can also rebuild an existing VPS to the new OS. Virtualizor is available from the Hostworld client area for start, stop, reboot, rebuild, VNC console and ISO mounting.
  • cPanel servers. The cPanel ELevate project documents CentOS 7 to AlmaLinux 8, then AlmaLinux 8 to 9. cPanel also advises that migrating to a new server with the WHM Transfer Tool is often safer than an in-place upgrade. As of 27 April 2026, cPanel support for Rocky Linux 8 and 9 ends on 31 March 2026. Choose AlmaLinux 9 or Ubuntu 24.04 LTS for a supported target.
  • Common pitfalls to avoid:
    • Leaving third-party repositories enabled without EL8 or EL9 equivalents. Clean or replace them before you upgrade. Enable only the explicit EL8 or EL9 repos when running Leapp.
    • Not pausing configuration management and monitoring during an in-place run. Agents like Puppet, Chef, Salt or Nagios can interrupt the transaction and corrupt the OS. Pause them until the upgrade is complete.
    • Networking after reboot. EL9 does not honour legacy ifcfg or network-scripts. Ensure NetworkManager keyfiles exist or the system can come up with DHCP.
    • Stricter crypto defaults on EL9. OpenSSL 3 and modern system-wide crypto policies can disable old protocols like TLS 1.0 and 1.1. Legacy clients may fail until ciphers and protocols are updated.
  • Backups. Take an off-box backup before any change. On a VPS, consider creating a second VPS and practising the migration there first.

Step 1: Decide your target OS

All three options below will get you off CentOS 7. The closest match to what you have is an EL9 clone. Ubuntu trades familiarity for a longer official security horizon through add-ons.

OS Closeness to CentOS 7 Standard support Extended security options Notes
AlmaLinux 9 Very close. Same RPM packaging. yum remains as an alias of dnf. General support to 31 May 2027 Security support to 31 May 2032 Tracks the RHEL 9 lifecycle. Minor releases go end of life when the next minor arrives.
Rocky Linux 9 Very close. Same RPM packaging. yum alias to dnf. General support to 31 May 2027 End of life 31 May 2032 Follows RHEL 9 and supports only the latest minor. Not a safe target for cPanel after 31 March 2026.
Ubuntu 24.04 LTS Different tools and layout. Uses apt and dpkg. 5 years standard support to June 2029 With Ubuntu Pro, security coverage to April 2034. Optional Legacy add-on to April 2039. Expects netplan for networking, ufw for firewalling, AppArmor for confinement by default.

Summary: pick AlmaLinux 9 for the least change, especially if you also run cPanel. Consider Ubuntu 24.04 LTS if you want the longest available security coverage and you are comfortable adapting to its tooling.

Step 2: Choose your migration approach

  1. Build new, migrate, cut over:
    • What you do: deploy a fresh AlmaLinux 9 or Ubuntu 24.04 VPS in our Virtualizor panel, install your services, copy data, switch DNS or service endpoints, then decommission CentOS 7.
    • Why it works: you avoid an in-place risk to production and you can test on a clean base. Rollback is as easy as pointing traffic back to the old host.
    • When to use it: most cases, and especially for control panels like cPanel where the WHM Transfer Tool exists.
  2. In-place upgrade via EL8, then EL9:
    • What you do: use AlmaLinux ELevate and Leapp to step from CentOS 7 to AlmaLinux 8, fix preupgrade blockers, complete 7 to 8, then repeat 8 to 9.
    • Why it works: it is the supported path with tooling that checks for blockers first.
    • When to use it: only when you cannot move the workload to a new instance. Schedule downtime and have a tested backup.

Step 3: Deploy or rebuild your Hostworld VPS on the target OS

In Virtualizor from the Hostworld client area, you can create a new VPS or rebuild an existing one. Choose AlmaLinux 9 or Ubuntu 24.04 LTS. You can use the VNC console to watch first boot and mount an ISO if you need a custom installation. Keep the CentOS 7 server online until you have tested the new one.

Step 4: Check the baseline on the new server

These checks confirm you are on the expected OS and highlight where CentOS 7 muscle memory will not carry over unchanged.

4.1 Confirm the OS release

This shows the distribution name and version so you know which set of commands to use next.

On AlmaLinux 9

cat /etc/os-release

On Ubuntu 24.04 LTS

cat /etc/os-release

4.2 Review the package manager basics

This lists a few installed packages so you can see the package manager in action.

On AlmaLinux 9

dnf list --installed | head -n 20

This uses dnf to list installed packages and prints the first 20 lines. On EL9, yum is an alias of dnf for compatibility.

On Ubuntu 24.04 LTS

apt list --installed | head -n 20

This uses apt to list installed packages and prints the first 20 lines.

4.3 Check how networking is configured

This shows where network profiles live on each OS so you do not rely on deprecated ifcfg files from EL7.

On AlmaLinux 9

ls -l /etc/NetworkManager/system-connections/

This lists NetworkManager keyfiles. EL9 uses these instead of legacy ifcfg files.

On Ubuntu 24.04 LTS

ls -l /etc/netplan/

This lists netplan YAML definitions that drive systemd-networkd or NetworkManager.

4.4 Inspect the firewall front end

This checks whether the expected firewall service is running and what it currently allows. EL9 defaults to firewalld using nftables under the hood. Ubuntu uses ufw by default.

On AlmaLinux 9

systemctl status firewalld --no-pager
firewall-cmd --get-active-zones
firewall-cmd --list-all

The first command shows the firewalld service state. The second prints active zones. The third lists rules in the default zone.

On Ubuntu 24.04 LTS

sudo ufw status verbose

This shows whether ufw is enabled and the current rule set.

4.5 Check the Python interpreter expectations

This confirms whether an unversioned python command exists and which Python 3 is available. From EL8 onward, the unversioned python is not provided by default.

On AlmaLinux 9

command -v python || echo "no 'python' shim"
python3 --version

The first line checks if a python shim exists. The second prints the Python 3 version.

On Ubuntu 24.04 LTS

command -v python || echo "no 'python' shim"
python3 --version

Same idea on Ubuntu. Adjust any scripts that call python to use python3.

Step 5: Plan for key differences from CentOS 7

These are the changes that most often surprise teams moving from EL7.

  • Networking: ifcfg files and the legacy network-scripts are deprecated or removed in EL9. Use NetworkManager keyfiles under /etc/NetworkManager/system-connections/. Old ifcfg content can be ignored in favour of keyfiles. On Ubuntu 24.04 LTS, networking is driven by netplan YAML under /etc/netplan/.
  • Firewalling: firewalld defaults to nftables on EL9. The old iptables tooling is a compatibility layer. Migrate custom iptables rules to firewalld rules or move to native nftables syntax. On Ubuntu, use ufw unless you choose to manage nftables directly.
  • Python: EL8 and newer do not ship an unversioned python by default. Use python3 and the modular Python streams. Update scripts that hardcode python.
  • Cryptography: EL9 ships OpenSSL 3 and stricter system-wide crypto policies. TLS 1.0 and 1.1 and older algorithms are disabled unless you opt in to a legacy policy. Validate your clients and services against the defaults before you relax anything. On Ubuntu you will also meet newer defaults, and AppArmor profiles can confine applications differently than SELinux did in EL7.
  • Packaging and layout: EL9 uses dnf with RPM packaging. Ubuntu uses apt with dpkg. Paths for configuration and service units are similar in places because both use systemd, but package names and locations often differ.

Step 6: If you must do an in-place upgrade, control the risks

  1. Back up the server fully off the VPS. Verify you can restore. A snapshot alone is not enough if it sits on the same host.
  2. Upgrade one major release at a time. Use AlmaLinux ELevate and Leapp to go from CentOS 7 to AlmaLinux 8. Only after that should you proceed from AlmaLinux 8 to 9. Do not attempt 7 to 9 in a single jump.
  3. Run Leapp’s preupgrade step and read the report. Resolve blockers before you run the actual upgrade. Typical blockers include third-party drivers, repositories without EL8 or EL9 branches, and installed agents or health checks that grab package locks.
  4. Disable or remove third-party repositories that do not have EL8 or EL9 equivalents. Replace them with the correct ones for the target release when needed. Leaving old repos enabled can pull wrong builds or break dependency resolution.
  5. Pause configuration management and monitoring. Disable Puppet, Chef, Salt, Nagios and similar tooling for the duration of the upgrade. Re-enable only after the OS is stable.
  6. Ensure networking comes back. EL9 ignores legacy ifcfg and network-scripts. Confirm that NetworkManager has keyfiles for each interface or that DHCP will assign addresses on first boot.
  7. Plan for stricter crypto defaults. If you run legacy TLS clients or servers, test them against an EL9 system first so you know whether you must adjust ciphers or protocols. Only relax system policies if you have no other choice.
  8. Reboot, validate, then proceed to the next major step. After arriving at EL8, test all services before moving on to EL9. Budget time for package and configuration changes between each stage.

Step 7: Special notes for cPanel servers

  • Target OS. As of 27 April 2026, cPanel’s matrix lists Rocky Linux 8 and 9 end of support on 31 March 2026. AlmaLinux 9 and Ubuntu 24.04 LTS remain supported, with Ubuntu 24.04 listed to April 2029 in that matrix. Choose AlmaLinux 9 or Ubuntu 24.04 for a supported path.
  • Preferred method. cPanel documents CentOS 7 to AlmaLinux 8 using the cPanel ELevate project, and then AlmaLinux 8 to 9. They also caution that migrating to a new server with the WHM Transfer Tool is often the safer route if you cannot risk downtime.
  • At Hostworld. If you want to build a new cPanel server on our platform, deploy a fresh VPS in Virtualizor on AlmaLinux 9 or Ubuntu 24.04 LTS, install cPanel, run the WHM Transfer Tool to pull accounts, then switch the live traffic over. If you need help planning the cut-over, please open a support ticket.

Step 8: Decide and act

For the least disruption from CentOS 7, move to AlmaLinux 9. It keeps the RPM ecosystem and your administration habits, and it aligns with cPanel’s current support. If you have a longer-term security horizon in mind and you are comfortable changing tooling, Ubuntu 24.04 LTS offers that through Ubuntu Pro and the Legacy support add-on. Whichever you choose, favour a fresh build and migration over an in-place jump from 7 to 9. If you do attempt in place, go 7 to 8 to 9 with Leapp preupgrade checks and a verified rollback plan.

What next

  • If you are ready to build on a new VPS, pick your plan on our Linux VPS page, deploy AlmaLinux 9 or Ubuntu 24.04 in Virtualizor, and start migrating services.
  • If you want practical migration patterns and checklists for moving services to a new host, browse our VPS guides.
  • If you would like us to review your plan or check the cPanel path for your estate, please open a support ticket. Tickets go straight to the right team and are logged against your account.

Common questions

Which option is closest to CentOS 7 with the least change?

AlmaLinux 9 or Rocky Linux 9. They are EL9 clones that keep RPM packaging, the same filesystem layout, SELinux behaviour and the yum command as an alias to dnf. For cPanel specifically, choose AlmaLinux 9 because cPanel deprecated Rocky support in 2026.

How long will each option receive updates?

AlmaLinux 9 follows RHEL 9 with general support through 31 May 2027 and security support through 31 May 2032. Rocky Linux 9 follows the same dates. Ubuntu 24.04 LTS has 5 years of standard support to June 2029, with security maintenance extended to April 2034 on Ubuntu Pro and an optional Legacy add-on extending to April 2039.

Can I upgrade CentOS 7 to 9 in one step?

No. A direct 7 to 9 in-place upgrade is unsupported and risky. The supported path is CentOS 7 to EL8 first using AlmaLinux ELevate and Leapp, then EL8 to EL9. Treat in-place upgrades with care and have a tested rollback.

What are the biggest changes I will hit when moving from EL7?

On EL9 you will see NetworkManager keyfiles instead of ifcfg, firewalld using nftables, no unversioned python command by default and stricter cryptographic defaults with OpenSSL 3. On Ubuntu 24.04 LTS you will move to apt and dpkg, netplan for networking, ufw for the firewall and AppArmor enforcing profiles for some services.

Should I move to Rocky Linux 9?

For non‑cPanel servers, Rocky Linux 9 is functionally as close to CentOS 7 as AlmaLinux 9 and follows the same support horizon. For cPanel servers, do not choose Rocky because cPanel lists Rocky 8 and 9 as end of support on 31 March 2026. Use AlmaLinux 9 or Ubuntu 24.04 LTS instead.