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

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

Once the server has been restarted, verify that it is running the latest AlmaLinux release.
# cat /etc/os-release

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

Confirm that the repository is added by running the following command.
# ls /etc/yum.repos.d/ | grep elevate

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

Disable SELinux
.
# vim /etc/sysconfig/selinux

Change SELinux
mode to Disabled.
SELINUX=disabled

NOTE: Once the upgradation process is completed, change the SELinux option to enforcing.
Reboot after disabling SELinux
.
# reboot

NOTE: If the SELinux is already disabled on the server, skip step 4.
Disable the firewalld ZoneDrifting
feature.
# vim /etc/firewalld/firewalld.conf

Disable Zonedrifting
by changing yes
to no
.
AllowZoneDrifting=no

Install leapp
packages.
# yum install -y leapp-upgrade leapp-data-almalinux

Run a pre-upgrade check
.
# leapp preupgrade

Upgrade AlmaLinux 8 to AlmaLinux 9 now.
# leapp upgrade

Reboot
after the upgrade.
# reboot

Once rebooted, check the OS version
.
# cat /etc/os-release
