After Red Hat, CentOS’s Linux parent company announced it was shifting focus from CentOS Linux, the rebuild of Red Hat Enterprise Linux (RHEL), to CentOS Stream, which tracks just ahead of a current RHEL release, many CentOS users were annoyed. CloudLinux, a company that had long made an eponymous RHEL clone for multi-tenant web and server hosting companies, announced it would create a new CentOS clone, AlmaLinux. It’s now available as a beta. CloudLinux promises this first release based on RHEL 8.x will be supported until at least 2029.

More information you can find on the official website 

AlmaLinux is a binary compatible community RHEL server Linux fork, so switching from CentOS to AlmaLinux would be easy with no downtime.

I this guide I will show you how to migrate from CentOS to AlmaLinux.

Remember! Make a backup of the system. We didn’t test all possible scenarios so there is a risk that something goes wrong. In such a situation you will have a restore point.

Migration

Update your CentOS system to the latest available version. I have CentOS 8  server with the latest updates.

[[email protected] ~]# cat /etc/redhat-release 
CentOS Linux release 8.3.2011

[[email protected] ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8""

Download the almalinux-deploy.sh script:

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

Run update

bash almalinux-deploy.sh

You will get a complete notification in the end.

An upgrade is a proper way of upgrading your system. Distro-sync is useful when you have mixed versions of packages from different versions and you want to sync all packages to the current version.

You should run distro-sync command.

dnf distro-sync

It will take some time to sync all packages.

Now you should reboot the server.

reboot

Here is what I see on the login screen.

Check the migration is successful.

[[email protected] ~]# cat /etc/redhat-release 
AlmaLinux release 8.3 Beta (Purple Manul)


[[email protected] ~]# cat /etc/os-release
NAME="AlmaLinux"
VERSION="8.3 (Purple Manul)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.3"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.3 Beta (Purple Manul)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:almalinux:almalinux:8.3:beta"
HOME_URL="https://almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"

ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8"
ALMALINUX_MANTISBT_PROJECT_VERSION="8"