Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

[KVM] Upgrade CentOS 7 to AlmaLinux OS

IevazIevaz Administrator
edited September 2022 in Linux Applications

In this tutorial, you will learn on how to upgrade your operating system from CentOS 7 to AlmaLinux OS manually.

As always, before making any changes to your VPS, you should make a backup of your VPS - save all the essential data. It will be a wise option if anything goes wrong.


  1. First of all, you need to update all the system packages and repositories:

sudo yum update -y

  1. Then you need to reboot your VPS:

sudo reboot

You might be disconnected from your VPS, so you will need to connect to your VPS again.

  1. After that, you need to install the elevate-release package with this command:

sudo yum install -y

After the installation is completed, the output should look something like this:

  1. The next step is to install leapp-data-almalinux package:

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

  1. Then, you need to initiate a pre-upgrade check. Down below provided command runs the checks to see if the upgrade will be successful or not and provides a report of possible remediations:

sudo leapp preupgrade

If due to some reason the test fails, all the reasons will be saved in a file that path is /var/log/leapp/answerfile.

  1. If pre-upgrade is successful, you will need to run these commands:

sudo rmmod pata_acpi

echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config

sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True

  1. Now, you can run the following command to migrate your OS from CentOS 7 to AlmaLinux:

sudo leapp upgrade

It might take up some time, so be patient.

Then reboot your VPS again:

sudo reboot

It might take up to 20-30 minutes; meanwhile, the server will not be accessible via SSH. Do not worry, you can try to access your VPS via Emergency Console and watch how the files are installing.

When the installation is completed, you will be asked to log in. So then you can try to connect to your VPS as root.

Once you log in to your VPS, you can run this command to check your OS version:

cat /etc/redhat-release

If AlmaLiux was installed, you should see a similar output:

And that's it, you have upgraded your OS successfully to AlmaLinux!

Sign In or Register to comment.


Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2024 Time4VPS. All rights reserved.

Get In Touch