AlmaLinux OS is a new RHEL fork from the team at CloudLinux. It is meant to be a free Linux Operating System, developed in close co-operation with the community, and for the community. As of this article update, the release of AlmaLinux available is not stable fit for production use. AlmaLinux OS is now stable and can be used in Production environments. We will see how to migrate CentOS 8 Server to AlmaLinux 8 operating system.

AlmaLinux OS is an open-source, community-driven project that intends to fill the gap left by the demise of the CentOS stable release. AlmaLinux OS is a 1:1 binary compatible fork of RHEL® 8 and it is built by the creators of the established CloudLinux OS. AlmaLinux OS is an enterprise-grade server OS, a stable Linux distribution with regular releases that come with long support windows. You can rely on AlmaLinux OS to run you and your clients’ critical workloads.

In this short article we show Linux users how to convert CentOS 8 To AlmaLinux 8 Server using almalinux-deploy bash script. You should have a running instance of CentOS 8 machine before you proceed.

Step 1: Login to CentOS 8 system

SSH into your CentOS 8 server.

$ ssh [email protected]

Check the OS release to confirm this a CentOS 8 OS.

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

$ cat /etc/redhat-release
CentOS Linux release 8.3.2011

We can confirm the release is 8.3.2011.

Step 2: Disable Secure Boot 

If you’re running on a hardware with Secure Boot you need to disable it. This is because AlmaLinux doesn’t support it yet (almbz#3). Detailed instructions for bare metal hardware can be found here. Instructions for VMWare are available here.

Step 3: Migrate from CentOS 8 To AlmaLinux OS

Download the almalinux-deploy.sh script:

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

Give the script execution bits.

chmod +x almalinux-deploy.sh

Then run the script with the commands below.

sudo bash ./almalinux-deploy.sh

The conversion should begin immediately.

....
Check root privileges                                                 OK
Check Secure Boot disabled                                            OK
Check centos-8.x86_64 is supported                                    OK
Download RPM-GPG-KEY-AlmaLinux                                        OK
Import RPM-GPG-KEY-AlmaLinux to RPM DB                                OK
Download almalinux-release package                                    OK
Verify almalinux-release package                                      OK
warning: /etc/dnf/vars/infra saved as /etc/dnf/vars/infra.rpmsave
Remove centos-linux-release package                                   OK
Remove centos-gpg-keys package                                        OK
Remove centos-linux-repos package                                     OK
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:almalinux-release-8.3-3.el8      ################################# [100%]
Install almalinux-release package                                     OK
Remove centos-logos package                                           OK
Install almalinux-logos package                                       OK
Last metadata expiration check: 0:00:02 ago on Tue 09 Mar 2021 08:32:46 PM UTC.
Dependencies resolved.
.....

If this was successful you should get below message at the end.

...
Migration to AlmaLinux is completed

Confirm that your CentOS 8 system was successfully converted to AlmaLinux 8:

$ 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 RC (Purple Manul)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:almalinux:almalinux:8.3:rc"
HOME_URL="https://almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"

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

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

Reboot the system to confirm it works:

$ sudo reboot

Checking repolist:

$ yum repolist
repo id                                                                   repo name
appstream                                                                 AlmaLinux 8 - AppStream
baseos                                                                    AlmaLinux 8 - BaseOS
extras                                                                    AlmaLinux 8 - Extras
powertools                                                                AlmaLinux 8 - PowerTools

Repolist file:

$ cat /etc/yum.repos.d/almalinux.repo

You have converted CentOS 8 system to AlmaLinux System. In our future guides we will cover AlmaLinux 8 Server administration. Stay connected for updates.

More guides.

Provision VMs on Openstack with Terraform

How To Install Suricata on Debian 10 (Buster)

How To Install Gitea on Amazon Linux 2