Site icon CentLinux

How to Migrate CentOS 8 to AlmaLinux

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, open-source, community-driven Linux distribution designed as a drop-in replacement for Red Hat Enterprise Linux (RHEL). It was created to fill the gap left by the discontinuation of CentOS Linux (after CentOS shifted its focus to CentOS Stream). AlmaLinux is built to be 1:1 binary compatible with RHEL, ensuring that applications and workloads running on RHEL or CentOS can seamlessly transition to AlmaLinux without modification.

Key Features of AlmaLinux

RHEL Compatibility:
AlmaLinux is fully compatible with RHEL, meaning it supports the same packages, APIs, and commands. This makes it an ideal choice for users migrating from CentOS or RHEL.

Community-Driven:
AlmaLinux is developed and maintained by the AlmaLinux OS Foundation, a non-profit organization, ensuring that it remains free and open-source for the long term.

Stable and Secure:
Like RHEL, AlmaLinux prioritizes stability, security, and long-term support, making it suitable for enterprise environments.

Regular Updates:
AlmaLinux provides timely security patches, bug fixes, and updates, closely following RHEL’s release cycle.

Easy Migration Tools:
AlmaLinux offers tools like almalinux-deploy to simplify the migration process from CentOS and other RHEL-based distributions.

Multiple Architectures:
AlmaLinux supports a wide range of architectures, including x86_64, ARM64, and others, making it versatile for different use cases.

Free to Use:
AlmaLinux is completely free to download, use, and distribute, with no subscription fees or licensing costs.

How to Migrate CentOS 8 to AlmaLinux

History

AlmaLinux was first released in March 2021 by CloudLinux Inc., a company with a long history of supporting Linux-based operating systems. In response to the discontinuation of CentOS Linux, CloudLinux committed $1 million annually to fund the development and maintenance of AlmaLinux. In 2023, the project was transitioned to the AlmaLinux OS Foundation, ensuring its independence and community-driven future.

Use Cases

AlmaLinux vs. CentOS Stream

While CentOS Stream serves as a rolling release distribution that tracks just ahead of RHEL, AlmaLinux aims to be a stable, production-ready alternative that mirrors RHEL’s functionality. This makes AlmaLinux a preferred choice for users who need a predictable and reliable operating system for enterprise use.

In summary, AlmaLinux is a robust, community-driven alternative to RHEL and CentOS, offering stability, security, and compatibility for enterprise and individual users alike.

Recommended Training: Linux Administration: The Complete Linux Bootcamp in 2025 from Andrei Dumitrescu, Crystal Mind Academy

Environment Specification

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

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

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

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

Almalinux Deploy Installing
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

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

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.

Struggling with AWS or Linux server issues? I specialize in configuration, troubleshooting, and security to keep your systems performing at their best. Check out my Fiverr profile for details.

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.

Exit mobile version