CentOS 8 to AlmaLinux 8: A Step-by-Step Migration Guide

This guide will help you to migrate in-place your current CentOS 8 installation to AlmaLinux 8 in a few simple steps.

As you know, CentOS 8 reached its End-of-Life on December 31, 2021. If you want to migrate your CentOS 8 server to AlmaLinux 8, a 1:1 binary compatible with CentOS and RHEL, follow the steps below.

An in-place upgrade involves using the official AlmaLinux automated script to migrate your current CentOS 8 operating system files to AlmaLinux.

In addition, an in-place upgrade does not require formatting of the hard disk, and due to that fact, all settings, programs, and files on your current CentOS 8 system will be preserved.

Steps to Migrate CentOS 8 to AlmaLinux 8

Here’s our CentOS 8 system before starting the migration process to AlmaLinux.

Sysytem Information Before Upgrade

1. Take System Backup

Before upgrading, please make sure you take the backup of all your important data and, if possible, take a snapshot of the complete CentOS 8 system. This way, you will be on the right side of things if anything goes wrong.

2. Upgrade the Current CentOS 8 System

The next step in the upgrade process is to ensure we have a wholly upgraded system. Update existing software with the following command:

sudo dnf update

Once all the packages are updated, reboot your system to apply the changes.

Now letโ€™s verify our current operating system version.

cat /etc/centos-release
Checking the Current CentOS 8 Version

3. Download the Official AlmaLinux Migration Script

The first step in the actual upgrade process is to download the almalinux-deploy.sh script from the AlmaLinux GitHub repo:

curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.shCode language: JavaScript (javascript)
almalinux-deploy.sh Migration Script

Next, make the script executable:

chmod +x almalinux-deploy.shCode language: CSS (css)

3. Migrate from CentOS 8 to AlmaLinux 8

Finally, with the script available locally, run it to start the migration process:

sudo bash almalinux-deploy.shCode language: CSS (css)

After the migration script performs a few initial checks, it will begin upgrading specific packages to synchronize the system with the current AlmaLinux 8 release.

Be patient since the upgrade process could take some time.

CentOS 8 to AlmaLinux 8 Migration in Progress

Once the migration is completed, you will get:

Migration from CentOS 8 to AlmaLinux 8 Completed Successfully

Run the following command to sync installed packages and then reboot the system:

sudo dnf distro-sync -y
sudo reboot

The GRUB menu will appear with the AlmaLinux entry at the very top. Just hit Enter or wait a sec, and it will boot automatically into AlmaLinux 8.

AlmaLinux 8 Bootloader

4. Check AlmaLinux Version to Validate Migration

To confirm that you have successfully migrated, check the OS version:

cat /etc/redhat-release
Check the OS Version

Thatโ€™s all. Congratulations! You have successfully migrated from CentOS 8 to AlmaLinux 8.

(Optional) In addition, you can change the server hostname to match with AlmaLinux:

sudo hostnamectl set-hostname almalinux8
sudo rebootCode language: JavaScript (javascript)
AlmaLinux 8 System Information

Conclusion

Please note that the almalinux-deploy.sh script will only convert CentOS 8 version to AlmaLinux 8. If you are running an older version like CentOS 7.x, all you have to do to switch to AlmaLinux 8 is follow our detailed guide – How to Migrate CentOS 7 to AlmaLinux 8: A Step-by-Step Guide.

I have tried to make this guide as simple as possible. Thanks for using it! Feel free to share your thoughts in the comments box below.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%