CentOS Red Hat

How to Migrate to AlmaLinux 8.4 from CentOS Linux

How to Migrate to AlmaLinux 8.4 from CentOS Linux

As you know by now, CentOS 8 is gravitating towards EOL which is set to be on December 31, 2021. CentOS 8 was to enjoy support until 2029 until recently when RedHat made the unpopular decision to terminate it in favor of CentOS Stream. This has stirred concern among users who relied on CentOS for their production workloads. Nonetheless, a few alternative distributions have been developed to fill the huge gap left by CentOS 8. Two distros that have been favored to take over from CentOS 8 include Rocky Linux and AlmaLinux.

Developed by CloudLinux, and currently maintained by the community, AlmaLinux is a free and open-source enterprise OS that was developed in response to the sudden and unfortunate end of CentOS 8. It is 1:1 binary compatible with RHEL and provides a stable and production-grade platform to handle production workloads. The latest stable and production-ready release is AlmaLinux 8.4, which is based on RHEL 8.4. You can choose to download AlmaLinux 8.4 and install it or simply migrate from CentOS 8 to AlmaLinux 8.4.

In this guide, we focus on the switch from CentOS 8 to AlmaLinux 8.4 which is the current stable and latest version.

NOTE:

Before you embark on the migration, it’s advisable to first make a backup copy of all your files such that in the event of any failure, your data will not be compromised. Ordinarily, the migration should be seamless, but it’s better to be safe than sorry, and the more the reason your filed should be backed up.

Step 1: Upgrade CentOS

The switch to AlmaLinx 8.4 demands that you have at least CentOS 8.3. To check the version you are running, run the command:

$ cat /etc/redhat-release

Here, I’m running CentOS 8.0.1905.

Let’s now upgrade to the latest CentOS version which is CentOS 8.4.

$ sudo dnf update

Once the upgrade is complete, confirm the version of your system. In this case, it has updated to the latest current version which is CentOS 8.4.

Step 2: Download Rocky Linux migration script

With CentOS 8 updated to the recent version, proceed and download the AlmaLinux migration script.

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

Then proceed and make the script executable using the chmod command.

$ chmod +x almalinux-deploy.sh

Step 3: Execute the migration script

Finally, to switch to AlmaLinux, execute the almalinux-deploy.sh migration script.

$ sudo bash almalinux-deploy.sh

The script executes a few checks and proceeds to remove old CentOS 8 packages, download and reinstall new ones and perform an upgrade of some of the existing packages to syn them with AlmaLinux repositories. This takes quite some time, and in my case, it took roughly 4 hours.

Once complete, you will get a message on the terminal that the migration was successful.

Finally, reboot your system to boot into the fresh instance of AlmaLinux

$ sudo reboot

On the GRUB menu, select AlmaLinux.

Shortly after, the login GUI display will come into view. Enter your password and log in.

And behold the new AlmaLinux 8.4!

You can further verify the version from the terminal as follows.

And this concludes this migration to AlmaLinux guide. As you have noted, it’s quite a simple but time-consuming process as the automated script performs all the operations needed to upgrade your system to AlmaLinux 8.4

Similar Posts