How to Migrate from CentOS to AlmaLinux

With the announcement made in December 2020 by the CentOS Project to shift the focus from being a free community-driven open source ecosystem focused on delivering a robust system to a build that is now effectively a beta software platform that tracks in front of the current enterprise Red Hat Enterprise Linux (RHEL) operating system and will be called CentOS Stream.

Furthermore, the CentOS Project have accelerated the scheduled end-of-life for CentOS 8 from 2029 to 31st December 2021. This means that no further system updates or security patches will be available after this date and the system could potentially become insecure. The current scheduled end-of-life for CentOS 7 remains unchanged, with updates and security patches continuing until the end of June 2024, although this may change at any time.

Naturally, with the change of focus in the CentOS project from offering rock-solid stability and the accelerated reduction in the lifecycle of CentOS 8, the ongoing stability and compatibility of CentOS Stream cannot be assured. As such, this means that CentOS 8/Stream should not be considered for use in production environments.

Within days of the original announcement by the CentOS Project, CloudLinux announced an open-sourced and community-driven fork of the Red Hat Enterprise Linux (RHEL) OS originally called Project Lenix and later renamed to Alma; a Latin-language word for soul. Igor Seletskiy, the CEO & Founder of CloudLinux, confirmed that initially AlmaLinux OS will be built by their own team but owned and governed by the community. His company will also be supporting AlmaLinux by sponsoring the project $1m annually.

AlmaLinux has been in development over the last four months and has been through community Beta and Release Candidate testing. The AlmaLinux team committed in the first Project Lenix announcement to have a full release in Q1 2021. Today, the 30th March 2021 sees the first stable release of AlmaLinux, which has been specifically tailored to meet the needs of users by offering a stable and secure enterprise platform for everyone.

In this guide, we will show you how you can migrate your existing CentOS 8 installation to AlmaLinux OS using the migration tool. The migration tool allows you to fully convert your server without having to complete a full reinstall.

Important

In order to migrate your existing CentOS 8 installation, we will be using an externally provided script released by the AlmaLinux team. While the conversion should not interfere with your current services or server, as always, we would recommended that you test it on a new system first and make sure to take backups before implementing this into a production environment.

Perquisites

To complete the automatic conversion from CentOS 8 we will use the official AlmaLinux script called almalinux-deploy. The almalinux-deploy script is written in Bash and the source code is available on GitHub.

Important

The almalinux-deploy script will only convert an existing CentOS 8 installation to AlmaLinux 8. If you are running an older version of CentOS such as 6.x or 7.x, this script will not work.

Before we will install AlmaLinux you will need to ensure your CentOS server is updated to the latest available version using the following command.

sudo dnf update -y

If your server didn’t have any updates to install you can safely continue. If your server downloaded and installed any updates we would recommend that you restart your server before continuing using the following command.

sudo reboot

Now we can proceed with downloading the almalinux-deploy script to automatically migrate to AlmaLinux.

Install AlmaLinux via almalinux-deploy

Now we will need to download the automated AlmaLinux conversion script from GitHub using the following command.

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

After downloading the script you will need to adjust the execute permissions using the following command.

chmod +x almalinux-deploy.sh

Now we are ready to migrate from CentOS 8 to AlmaLinux 8. During the migration the script will perform some initial checks and will then begin the process of removing, reinstalling, downgrading and upgrading certain packages in order to synchronise the system with the current AlmaLinux release. This process will take some time depending upon the connection speed and the total number of installed packages in your current CentOS system. To start the Almalinux migration simply use the following command.

sudo bash almalinux-deploy.sh

Once the migration has successfully completed you will see the following message, Migration to AlmaLinux is completed, please reboot the system. Now you can reboot your server using the following command to boot into your newly installed AlmaLinux OS.

sudo reboot

Once your system has rebooted you can check to ensure your server was successfully converted to AlmaLinux using the cat /etc/redhat-release and sudo grubby --info DEFAULT | grep AlmaLinux commands.

[root@vpsbasics.com] # cat /etc/redhat-release
AlmaLinux release 8.3 (Purple Manul)
[root@vpsbasics.com] # sudo grubby --info DEFAULT | grep AlmaLinux
title="AlmaLinux (4.18.0-240.15.1.el8_3.x86_64) 8.3 (Purple Manul)"

That’s it. You have successfully converted your CentOS 8 server and migrated to AlmaLinux.

Install AlmaLinux via ISO

Instead of using the almalinux-deploy script to migrate to AlmaLinux, you can install AlmaLinux using an ISO. Just like when installing CentOS via ISO you will have three different choices; DVD1, Minimal and Boot. All AlmaLinux ISOs was available from their official repository.

The biggest file is the DVD1 ISO. This version comes with GNOME GUI and other common software already installed. You would use this ISO if you wanted to run a GUI or use AlmaLinux as a desktop server.

If you want to install AlmaLinux without a GUI, you would need to download the Minimal ISO. The Minimal ISO comes with basic functionality and is the standard installation of AlmaLinux. You can install other packages after installing AlmaLinux using the Minimal ISO should this be required. This ISO is more suited to be installed on a server.

The Boot ISO file is the smallest in size and will need to connect to the AlmaLinux repository to download all the necessary software during installation. You would use this ISO if you were deploying AlmaLinux on a large number of servers.

If you are familiar with installing CentOS via ISO, then installing AlmaLinux via ISO is exactly the same as you can see from the screenshots below.

Installion Screen

How to Migrate from CentOS to AlmaLinux

Welcome Screen

How to Migrate from CentOS to AlmaLinux

Server Installion

How to Migrate from CentOS to AlmaLinux

Minimal Installion

How to Migrate from CentOS to AlmaLinux

Summary Screen

How to Migrate from CentOS to AlmaLinux

Progress Screen

How to Migrate from CentOS to AlmaLinux

That’s it. You have successfully installed AlmaLinux OS on your server using the official ISOs.

How useful was this guide?

Click on a star to rate it!

Average rating / 5. Vote count:

Be the first to rate this guide.

We are sorry that this guide was not useful for you!

Help us to improve this guide!

Tell us how we can improve this guide?

By VPSBasics

This guide was written by the VPS Basics editorial team, led by Gilberto Van Roosen. They are a unique blend of people, dedicated to providing highly detailed, comprehensive and importantly easy to follow tutorials, written in plain English. They specialise in tutorials for managing Linux servers and its software.

Join the Conversation

Note: Your email address will not be published when posting a comment.

Note: All comments are held for moderation and are reviewed by our editorial team prior to approval.

VPSBasics uses Akismet anti-spam filters to reduce spam across our website. Our website is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Learn how your data is processed.