Home AlmalinuxHow to Migrate CentOS 7 to AlmaLinux 9 with ELevate

How to Migrate CentOS 7 to AlmaLinux 9 with ELevate

by Knowledge Base Linux
How to Migrate CentOS 7 to — How to Migrate CentOS 7 to AlmaLinux 9 with ELevate

CentOS 7 reached end of life on June 30, 2024, which means it no longer receives security patches. If you still run CentOS 7 servers, the safest way forward without reinstalling everything is to migrate CentOS to AlmaLinux using ELevate, the AlmaLinux in-place upgrade tool built on the Leapp framework. ELevate upgrades CentOS 7 to AlmaLinux 8, and a second pass takes you to AlmaLinux 9. This guide explains the complete process, including the pre-upgrade checks that catch problems before they break your server.

How ELevate Works – How to Migrate CentOS 7 to

ELevate replaces your CentOS packages with AlmaLinux packages of the next major release while keeping your data, users and most configuration in place. It first runs a preupgrade analysis that reports inhibitors — issues that would make the upgrade fail, such as unsupported kernel modules, full disks or conflicting repositories. The actual upgrade happens during a special reboot into an upgrade initramfs, so downtime is roughly one long reboot plus the package transaction.

Before You Migrate CentOS to AlmaLinux – How to Migrate CentOS 7 to

  • Take a full backup or VM snapshot. There is no supported rollback; a snapshot is your only way back.
  • Confirm you run CentOS 7.9 with at least 2 GB of free space in /var and a separate boot partition with 200 MB free.
  • Remove third-party repositories and packages you no longer need; they are the most common source of inhibitors.
  • Schedule a maintenance window — expect 30 to 90 minutes depending on disk speed.

Step 1: Update CentOS 7 and Reboot

Bring the system fully up to date so the upgrade starts from the final CentOS 7 package set:

sudo yum update -y
sudo reboot
cat /etc/redhat-release

Step 2: Install ELevate and Leapp

Install the ELevate release package and the AlmaLinux upgrade data:

sudo yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm
sudo yum install -y leapp-upgrade leapp-data-almalinux
Migrate CentOS to AlmaLinux upgrade process with ELevate

Step 3: Run the Preupgrade Check

This is the most important step when you migrate CentOS to AlmaLinux. The preupgrade phase simulates the upgrade and writes a report:

sudo leapp preupgrade

Review /var/log/leapp/leapp-report.txt. Every item flagged as an inhibitor must be resolved. Common examples and fixes:

  • Missing space in /boot — remove old kernels with package-cleanup --oldkernels --count=2.
  • Unsupported network naming — ensure interfaces use persistent names.
  • Root login over SSH will be disabled — answer the Leapp question about PermitRootLogin as shown in the report, for example: sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True for the PKCS#11 module prompt.

Re-run the preupgrade until no inhibitors remain. Taking time here is what makes the real upgrade boring — and boring is good.

Step 4: Run the Upgrade

Start the in-place upgrade and reboot into the upgrade environment:

sudo leapp upgrade
sudo reboot

The console shows the system booting into the Leapp initramfs, performing the package transaction and relabeling SELinux contexts. Do not interrupt power during this phase. Afterwards the machine reboots normally into AlmaLinux 8.

Step 5: Verify the Result

cat /etc/os-release
uname -r
sudo dnf check-update

You should see AlmaLinux 8.10 (or the latest 8.x) and a 4.18 kernel. Check that your services started (systemctl --failed) and test your applications before continuing.

Step 6: Continue from AlmaLinux 8 to AlmaLinux 9

With the server stable on AlmaLinux 8, repeat the same pattern to reach version 9: update fully, install the el8 ELevate release package and leapp-data-almalinux, run sudo leapp preupgrade, fix any inhibitors, then sudo leapp upgrade and reboot. The official project page at almalinux.org/elevate lists supported paths and known issues for each release.

Troubleshooting

Upgrade stops with dependency errors: usually caused by leftover third-party packages; remove or replace them with AlmaLinux equivalents and re-run preupgrade. Server does not boot after upgrade: boot the old kernel from GRUB to investigate, and check /var/log/leapp/leapp-upgrade.log. Services fail because of missing libraries: reinstall the affected package from the new repositories so it links against the current libraries. If the preupgrade report is overwhelming, fix inhibitors one at a time — each run reflects your progress.

What Happens to Third-Party Software and Control Panels?

Software installed from the base system upgrades cleanly, but anything layered on top deserves a check before you migrate CentOS to AlmaLinux. Hosting control panels are the big example: cPanel supports both the CentOS 7 starting point and the AlmaLinux result, yet you should confirm your exact panel version is rated for the ELevate path and update the panel first. Custom-compiled software — a hand-built PHP, a vendor monitoring agent, an old Java runtime — may keep working because AlmaLinux 8 preserves most library ABIs, but test each one immediately after the first boot. Kernel modules built for CentOS 7 (some RAID, antivirus and backup agents ship them) will not load on the new kernel and must be replaced with AlmaLinux builds.

After the upgrade, run through a short validation list: verify every systemd service is enabled and running, re-check firewall rules (they are migrated, but confirm), test a full backup job, and confirm cron jobs executed — check /var/log/cron and your application logs. PHP applications deserve special attention because AlmaLinux 8 changes the default PHP stream to 7.2 and offers newer streams; select the version your application supports with dnf module list php before declaring the migration complete. Only after a full day of clean operation should you delete the pre-upgrade snapshot.

Conclusion

To migrate CentOS to AlmaLinux, you prepare and snapshot the server, install ELevate, clean up every preupgrade inhibitor, run the upgrade, verify, and optionally repeat to reach AlmaLinux 9. Done carefully, an end-of-life CentOS 7 machine becomes a fully supported AlmaLinux system — same data, same services, years of security updates ahead.

Related reading: How to Install LAMP Stack on AlmaLinux 9 (Apache, MariaDB, PHP)

You may also like

KbLinux

Typically replies within a day

Hello, Welcome to the site. Please click below button for chatting me through Telegram.