Alma version upgrade instructions (8 -> 9)
Running these commands could break your system, remember to create backups!
Start with updating packets:
sudo yum update -y
Reboot:
reboot
Download elevate repository:
sudo yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm
Import GPG-key:
sudo rpm --import https://repo.almalinux.org/elevate/RPM-GPG-KEY-ELevate
Install leapp packets:
sudo yum install -y leapp-upgrade leapp-data-almalinux
Do a preupgrade check with command:
sudo leapp preupgrade
The preupgrade check might show errors, in this example the problem is "Possible problems with remote login using root account".
All commands below are meant to be run on your server through an SSH connection. More instructions about https://linuxhint.com/ssh-connection-guide/
connect by running (replace user
and server_ip
with your details):
ssh user@server ip
Open the SSH daemon config file:
sudo vim /etc/ssh/sshd_config
Find the line containing PermitRootLogin
.To disable root login with password over SSH, set it to:
"PermitRootLogin" and add "prohibit-password".
to allow root login with password set it to "PermitRootLogin yes"
Save and exit by pressing Esc and then type :wq
Check current SSH settings
sshd -T | grep -Ei 'permitrootlogin|passwordauthentication'
(Optional) Edit SSH settings directly from the command line
You can update these settings without an editor by running:
sudo sed -i 's/^#*PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
sudo sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
Note: To disable root login with password, replace yes
with prohibit-password
.
Restart SSH services
sudo systemctl restart sshd
confirm the changes
sshd -T | grep -Ei 'permitrootlogin|passwordauthentication'
Do the preupgrade check again with command:
sudo leapp preupgrade
When all errors and prohibits are gone, start the upgrade with command:
sudo leapp upgrade
Reboot after the upgrade is done:
reboot
Choose "ELevate-Upgrade-Initramfs".
Alma should now be upgraded.
you can check the Alma version using the following commands.
cat /etc/redhat-release
cat /etc/os-release
If, the output shows AlmaLinux 9, the upgrade from almalinux (8 -> 9) was successful.