Share on Social Media

In this Linux tutorial, you will learn how to migrate CentOS 8 to AlmaLinux, which is a free and open source CentOS alternative. #centlinux #linux #almalinux

What is AlmaLinux?

AlmaLinux is a free and open source Linux distribution, created originally by CloudLinux to provide a community-supported, production-grade enterprise operating system that is binary-compatible with Red Hat Enterprise Linux (RHEL). The first stable release of AlmaLinux was published on March 30, 2021.

On December 8, 2020, Red Hat announced that development of CentOS Linux, a free-of-cost downstream fork of the commercial Red Hat Enterprise Linux (RHEL), would be discontinued and its official support would be cut short to focus on CentOS Stream, a rolling release officially used by Red Hat to preview what is intended for inclusion in updates to RHEL.

In response, CloudLinux – which maintains its own commercial Linux distribution, CloudLinux OS – created AlmaLinux to provide a community-supported spiritual successor to CentOS Linux, aiming for binary-compatibility with the current version of RHEL.

On March 30, 2021, the AlmaLinux OS Foundation was created to take over AlmaLinux development and governance from CloudLinux, which has promised $1 million in annual funding to the project. (Source: Wikipedia)

Environment Specification

We are using a minimal CentOS 8 virtual machine with following specifications.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating System – CentOS 8.3
  • Hostname – centos-linux-8.centlinux.com
  • IP Address – 192.168.116.230 /24

Check Current Linux Operating System

Connect with your CentOS Linux server as root user by using a ssh client.

Check the Linux distribution and its version.

# 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/centos-release
CentOS Linux release 8.3.2011

Check the current Linux Kernel used by your operating system.

# uname -r
4.18.0-240.1.1.el8_3.x86_64

Migrate CentOS 8 to AlmaLinux

AlmaLinux provides a bash script to automate the migration process. This script is available for free download at GitHub.

Execute the wget command from Linux command line to download almalinux-deploy.sh script.

# wget https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
--2021-07-04 22:55:09--  https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26460 (26K) [text/plain]
Saving to: ‘almalinux-deploy.sh’

almalinux-deploy.sh 100%[===================>]  25.84K  --.-KB/s    in 0.09s

2021-07-04 22:55:11 (298 KB/s) - ‘almalinux-deploy.sh’ saved [26460/26460]

Grant execution permissions on almalinux-deploy.sh script.

# chmod +x almalinux-deploy.sh

Now, you can execute the script to start migration process.

Be noted that, if you are migrating from a CentOS version earlier than 8.3, you have to update your CentOS Linux operating system before invoking migration process.

# ./almalinux-deploy.sh
Almalinux Deploy Checking
Almalinux Deploy Checking

The script first gather the information about your CentOS 8 operating system and then swap the Linux yum repositories with that of AlmaLinux.

Almalinux Deploy Downloading
Almalinux Deploy Downloading

The script then identify the software packages that need to be update or install on your Linux server.

Almalinux Deploy Installing
Almalinux Deploy Installing
Almalinux Deploy Completed
Almalinux Deploy Completed

After installation of required software packages, the script will end gracefully.

Reboot your machine with newly installed Linux Kernel.

# reboot
Almalinux GRUB Menu
Almalinux GRUB Menu

You can see that a newly entry pertains to Almalinux has been added in GRUB boot menu.

Press <ENTER> to start your operating system with updated Linux Kernel.

Almalinux CLI Login
Almalinux CLI Login

After successful startup, the system will display the CLI based login prompt of Almalinux.

Checking Linux OS after Migration

Login as root user and check the operating system details again.

# cat /etc/os-release
NAME="AlmaLinux"
VERSION="8.4 (Electric Cheetah)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.4 (Electric Cheetah)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:almalinux:almalinux:8.4:GA"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"
ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8"
ALMALINUX_MANTISBT_PROJECT_VERSION="8.4"

# cat /etc/centos-release
AlmaLinux release 8.4 (Electric Cheetah)

Check the version of Linux Kernel again.

# uname -r
4.18.0-305.7.1.el8_4.x86_64

Your CentOS Linux operating system has been migrated to AlmaLinux.

Final Thoughts

Transitioning from CentOS 8 to AlmaLinux is a strategic move towards ensuring continuity, reliability, and long-term support for your system. Our comprehensive guide simplifies the migration process, ensuring a seamless transition while preserving your data integrity.

Should you require personalized assistance or have specific needs during the migration, I offer expert services tailored to facilitate a smooth transition. Explore my expertise and service offerings on my Fiverr profile:

Linux System Administration – Fiverr Service

Let me guide you through the migration journey, ensuring a seamless shift from CentOS 8 to AlmaLinux, and empowering your system with stability and support for the future.

Leave a Reply

Your email address will not be published. Required fields are marked *