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! It’s not an official way to switch. So we should wait for stable releases, with migration instruction.

Migration

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"

Now, remove all CentOS repositories and GPG keys.

rpm -e --nodeps centos-linux-release centos-linux-repos centos-gpg-keys

Download and install AlmaLinux release package from here.

rpm -Uvh https://repo.almalinux.org/almalinux/8.3-beta/BaseOS/x86_64/os/Packages/almalinux-release-8.3-2.el8.x86_64.rpm

Retrieving https://repo.almalinux.org/almalinux/8.3-beta/BaseOS/x86_64/os/Packages/almalinux-release-8.3-2.el8.x86_64.rpm
warning: /var/tmp/rpm-tmp.2Qoi9R: Header V4 RSA/SHA256 Signature, key ID c21ad6ea: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:almalinux-release-8.3-2.el8 ################################# [100%]

Run update

dnf update

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 switch 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"