How to upgrade from Almalinux 8 to Almalinux 9

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®.

  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
    
    
  2. After the update is completed, reboot the server.

    # reboot
    
    

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

    # cat /etc/os-release
    
    

  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
    
    

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

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

  6. Import the Elevate GPG key.

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

  7. Disable SELinux.

    # vim /etc/sysconfig/selinux
    
    

  8. Change SELinux mode to Disabled.

    SELINUX=disabled
    
    

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

  9. Reboot after disabling SELinux.

    # reboot
    
    

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

  10. Disable the firewalld ZoneDrifting feature.

    # vim /etc/firewalld/firewalld.conf
    
    

  11. Disable Zonedrifting by changing yes to no.

    AllowZoneDrifting=no
    
    

  12. Install leapp packages.

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

  13. Run a pre-upgrade check.

    # leapp preupgrade
    
    

  14. Upgrade AlmaLinux 8 to AlmaLinux 9 now.

    # leapp upgrade
    
    

  15. Reboot after the upgrade.

    # reboot
    
    

  16. Once rebooted, check the OS version.

    # cat /etc/os-release
    
    


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