How to Migrate From CentOS to AlmaLinux

February 18, 2021 | 1 min read

This article will go over the step by step instructions for migrating from CentOS Linux to AlmaLinux. These are the official instructions as released by the AlmaLinux developers on their GitHub page.

1. First, execute the following curl command to download the almalinux-deploy.sh script from the AlmaLinux GitHub page.

$ curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh

2. Make sure you give the script execute permissions, and then run it as root or with sudo.

$ chmod +x almalinux-deploy.sh
$ sudo bash almalinux-deploy.sh

The script will check a few things, issuing "OK" response as long as everything checks out. Then, the long process of migrating the system will begin. Many packages will need to be downloaded, reinstalled, upgraded, or downgraded.

Running AlmaLinux migration script

3. Once the script has completed synchronizing your CentOS system to the current AlmaLinux release, you can reboot the machine and load into AlmaLinux.

$ reboot

The AlmaLinux migration script confirms that it has completed successfully

4. Once you've loaded into AlmaLinux, confirm that the migration was successful by checking the contents of the /etc/redhat-release file.

$ cat /etc/redhat-release 
AlmaLinux release 8.3 (Purple Manul)

5. Lastly, make sure that the system boots to the AlmaLinux kernel by default.

$ sudo grubby --info DEFAULT | grep AlmaLinux
title="AlmaLinux (4.18.0-240.el8.x86_64) 8"

All done. Your system has been successfully migrated over to AlmaLinux from CentOS, assuming you didn't encounter any errors throughout the process.