
This guide walks through upgrading CentOS 7 (EOL) to AlmaLinux 8 using the official Elevate/Leapp migration framework.
⚠️ Important Notes Before You Begin
- CentOS 7 reached End of Life in June 2024.
- Upgrade is in-place, but not risk-free.
- Backups are mandatory.
- Requires:
- 2GB+ RAM (4GB recommended)
- 5GB+ free disk space in
/ - Direct root or sudo access
- No active control panels (cPanel is NOT supported for Leapp upgrades)
How to Upgrade CentOS 7 to AlmaLinux 8+ Using Leapp
To upgrade CentOS 7 to AlmaLinux 8+ using Leapp, follow the steps below:
-
Pre-Upgrade Preparation
-
Update CentOS 7 fully
yum clean all yum update -y reboot
Verify version:
cat /etc/centos-release
Should show:
CentOS Linux release 7.9.2009 (Core)
-
Remove Unsupported Packages
List 3rd-party packages:
rpm -qa | grep -E "elrepo|epel|ius|remi"
Disable or remove non-essential repos.
Check for held packages:
yum versionlock list
-
Check Disk Space
df -h
Ensure
/has at least 5GB free.
-
-
Install Elevate (Leapp Framework)
The Elevate project allows migration between Enterprise Linux versions.
Install repository:
yum install -y https://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm
Install Leapp data for AlmaLinux 8:
yum install -y leapp-upgrade leapp-data-almalinux
-
Run Pre-Upgrade Check
This step analyzes your system and generates a report.
leapp preupgrade
Reports are generated at:
/var/log/leapp/leapp-report.txt
AND
/var/log/leapp/leapp-report.json
Resolve Inhibitors
Common blockers:
- Firewalld configuration issues
- Old kernel modules
- Deprecated authentication methods
- Removed packages
Example: remove deprecated PAM module:
yum remove -y pam_pkcs11
After fixing issues:
leapp preupgrade
Repeat until no inhibitors remain.
-
Start the Upgrade
When clean:
leapp upgrade
This prepares the system and installs the new AlmaLinux 8 packages.
-
Reboot Into Upgrade Environment
After completion:
reboot
GRUB will automatically boot into:
Leapp Upgrade Initramfs
Upgrade process runs automatically.
This may take 10–30 minutes depending on system size.
-
Verify AlmaLinux 8
After reboot:
cat /etc/os-release
You should see:
AlmaLinux 8.x
Verify kernel:
uname -r
Should show:
4.18.x.el8
-
Post-Upgrade Cleanup
Remove old CentOS 7 packages:
rpm -qa | grep el7
Remove leftovers:
dnf remove -y $(rpm -qa | grep el7)
Remove old kernels:
dnf remove -y kernel-3.10.*
Clean up:
dnf autoremove -y dnf clean all
-
Re-enable Repositories
Re-enable EPEL (EL8 version):
dnf install -y epel-release
Reinstall any required services.
-
SELinux Relabel (Recommended)
touch /.autorelabel reboot
-
Validate Critical Services
Check:
systemctl status
Verify:
⚠️ Known Caveats
- Direct upgrade to AlmaLinux 9 is NOT supported from CentOS 7.
- Must go:
- CentOS 7 → AlmaLinux 8
- AlmaLinux 8 → AlmaLinux 9 (separate process)
- Control panels like cPanel are not supported for in-place upgrades.
Recommended Production Strategy
Safer method for production nodes:
- Deploy fresh AlmaLinux 8 VPS
- Migrate services manually
- Test
- Switch DNS / IP
- Decommission CentOS 7
In-place upgrades are acceptable for:
- Internal nodes
- Monitoring servers
- Non-cPanel standalone services
Optional: Upgrade AlmaLinux 8 → AlmaLinux 9
After reaching AlmaLinux 8:
dnf install -y leapp-upgrade leapp-data-almalinux leapp preupgrade leapp upgrade reboot
Final Checklist
- ✅ Full backup taken
- ✅ Preupgrade report clean
- ✅ No inhibitors
- ✅ Services validated
- ✅ SELinux relabeled
- ✅ Old kernels removed
Conclusion
You now know how to upgrade CentOS 7 to AlmaLinux 8+ with Leapp.









