How to upgrade from AlmaLinux 8 to AlmaLinux 9

2023-01-27 By Nathan 30823 Views linux almalinux upgrade
13 reviews

AlmaLinux is developed by the AlmaLinux OS Foundation established as a non-profit to steward ownership. The void created by the end of the CentOS Linux stable release is filled by AlmaLinux OS, an open-source, community-driven Linux operating system. AlmaLinux OS is a community-driven 1:1 binary compatible clone of RHEL®.


This tutorial walks readers through the process of upgrading AlmaLinux 8 to AlmaLinux 9.

NOTE: Always backup the server before you make major changes.


  1. Update the server and make sure all software installed is up to date, running the latest release of AlmaLinux 8.


    Type in the following command in the console to update.

    # yum update -y
    

    upgradealmalinux1

  2. After the update is completed, reboot the server.

    # reboot
    

    upgradealmalinux2

  3. Once the server has been restarted, verify that it is running the latest AlmaLinux release.

    # cat /etc/os-release
    

    upgradealmalinux3

  4. Downloading the elevate testing repository is the next step. Elevate aids in distributions based on the RHEL version migration. Run the next command to down the repository.

    # curl https://repo.almalinux.org/elevate/testing/elevate-testing.repo -o /etc/yum.repos.d/elevate-testing.repo
    

    upgradealmalinux4

  5. Confirm that the repository is added by running the following command.

    # ls /etc/yum.repos.d/ | grep elevate
    

    upgradealmalinux5

  6. Import the Elevate GPG key.

    # rpm --import https://repo.almalinux.org/elevate/RPM-GPG-KEY-ELevate
    

    upgradealmalinux6

  7. Disable SELinux.

    # vim /etc/sysconfig/selinux
    

    upgradealmalinux7

  8. Change SELinux mode to Disabled.

    SELINUX=disabled
    

    upgradealmalinux8

    NOTE: Once the upgradation process is completed, change the SELinux option to enforcing.

  9. Reboot after disabling SELinux.

    # reboot
    

    upgradealmalinux9

    NOTE: If the SELinux is already disabled on the server, skip step 4.

  10. Disable the firewalld ZoneDrifting feature.

    # vim /etc/firewalld/firewalld.conf
    

    upgradealmalinux10

  11. Disable Zonedrifting by changing yes to no.

    AllowZoneDrifting=no
    

    upgradealmalinux11

  12. Install leapp packages.

    # yum install -y leapp-upgrade leapp-data-almalinux
    

    upgradealmalinux12

  13. Run a pre-upgrade check.

    # leapp preupgrade
    

    upgradealmalinux13

  14. Upgrade AlmaLinux 8 to AlmaLinux 9 now.

    # leapp upgrade
    

    upgradealmalinux14

  15. Reboot after the upgrade.

    # reboot
    

    upgradealmalinux15

  16. Once rebooted, check the OS version.

    # cat /etc/os-release
    

    upgradealmalinux16


The server has successfully upgraded from Almalinux 8 to Almalinux 9.

What do you think about this article?

Rate this article
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.