How to Upgrade from CentOS 7 to AlmaLinux 8 or 9 Print

  • centos 7, Almalinux 8, almalinux 9, centos 7 upgrade, centos 7 eol, almalinux
  • 1

 

CentOS 7 is nearing its end-of-life support, making it critical to migrate to a modern OS like AlmaLinux. This guide provides a step-by-step process to upgrade your server from CentOS 7 to AlmaLinux 8 or 9 using the ELevate tool.

Prerequisites:

  • VPS or dedicated server running CentOS 7.
  • Root or sudo user access.
  • A complete backup of all data.
  • Ensure the system is up-to-date.

Step-by-Step Upgrade Process

1. Prepare Your System

  1. Update all system packages:
    sudo yum update -y
  2. Reboot the server to apply updates:
     
    sudo reboot
  3. Confirm the current version:
     
    cat /etc/centos-release

2. Install the ELevate Tool

  1. Add the ELevate repository:
     
    sudo yum install -y https://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm
  2. Install the leapp package:
     
    sudo yum install -y leapp

3. Check Compatibility

  1. Run the pre-upgrade check:
     
    sudo leapp preupgrade
  2. Review the compatibility report at /var/log/leapp/leapp-report.txt.
  3. Address any issues outlined in the report.

4. Start the Upgrade

  1. Run the upgrade command:
     
    sudo leapp upgrade
  2. Reboot the system:
     
    sudo reboot
    Your server will boot into a special initramfs environment to complete the upgrade.

5. Verify the Upgrade

  1. Log in and verify the version:
     
    cat /etc/redhat-release
    It should indicate AlmaLinux 8 or 9.

6. Post-Upgrade Steps

  1. Reinstall or update any third-party repositories.
  2. Test all services and applications.
  3. Clean up unused packages:
     
    sudo yum autoremove

Troubleshooting

  • Check logs if issues arise:
    • /var/log/leapp/leapp-upgrade.log
    • /var/log/leapp/leapp-report.txt
  • Ensure adequate disk space.
  • Disable conflicting third-party repositories.

Conclusion

Upgrading from CentOS 7 to AlmaLinux 8 or 9 is essential for continued support and security. This guide helps ensure a smooth transition with minimal downtime.


Was this answer helpful?

« Back