As we have previously announced in this post AlmaLinux is the new LTS alternative distribution to RedHat RHEL 8 and CentOS 8 CentOS is in fact "dead" if we mean by CentOS that RHEL Enterprise compatible distribution that allowed stable packages and ten-year lifecycles.
In addition to the considerable discontent of the Open Source community, the disappointment of all those who used the latest CentOS 8 release was obviously revealed, who saw the life cycle end in December 2021, about 10 years earlier than initial expectations.
Obviously the main concern was about how to behave, especially for entrepreneurial and commercial realities that have dozens, or hundreds of machines installed with CentOS 8.
As we have already said therefore AlmaLinux is the solution.
AlmaLinux is a free, community-controlled, open source Linux distribution for businesses with a focus on long-term stability, providing a robust production-grade platform. AlmaLinuxOS is 1: 1 compatible with RHEL® and CentOS pre-Stream.
This step by step tutorial explains how to migrate to AlmaLinux 8 from CentOS 8 using the script Almalinux-deploy . Using the Almalinux-deploy script, we can easily convert CentOS machines to AlmaLinux.
It is written in Bash and the source code is available on GitHub. Now let's go ahead and migrate from CentOS to AlmaLinux with the almalinux-deploy script.
Step 1: update your CentOS system to the latest version available such as root
o sudo
root:
$ sudo dnf update
Step 2: reboot system to apply updates:
$sudo reboot
Let's check the current version of CentOS 8:
$ cat / etc / redhat-release CentOS Linux version 8.3.2011
Yes, it is the latest version!
Step 3: download the almalinux-deploy script using the command:
$ curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
Step 4: go to the location where you downloaded the script and run the script to start the Almalinux migration:
$ sudo bash almalinux-deploy.sh
This command will install some new packages, upgrade and downgrade some existing packages, reinstall some packages, and uninstall some packages.
It will take a couple of minutes depending on the speed of your internet connection and the total number of packages installed in your CentOS system.
Example of output:
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 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-4.el8 ################################## # [100%] Install almalinux-release package OK determining the fastest mirror (55 hosts) .. done. [===] --- B / s | 0 B -: - ETA AlmaLinux 8 - BaseOS 125 kB / s | 3.4 MB 00:27 AlmaLinux 8 - AppStream 155 kB / s | 6.8 MB 00:44 AlmaLinux 8 - PowerTools 589 kB / s | 2.1 MB 00:03 AlmaLinux 8 - Extras 3.3 kB / s | 3.6 kB 00:01 Dependencies resolved.
If the migration is successful, you will see the following message:
[...] Complete! Run dnf distro-sync -y OK
Step 5: run the following command to synchronize the installed packages with the latest available versions.
$ sudo dnf distro-sync -y
Step 6: Reboot the system (reboot)
$sudo reboot
Now your system will need to boot into the newly migrated AlmaLinux:
Step 7: Login to your AlmaLinux and check the version:
$ cat / etc / redhat-release AlmaLinux release 8.3 (Purple Manual)
Congratulations! The migration was successful.
Make sure and verify that the system boots into AlmaLinux by default using this command:
$ sudo grubby --info DEFAULT | grep AlmaLinux
Example of output:
title = "AlmaLinux (4.18.0-240.15.1.el8_3.x86_64) 8.3 (Purple Manul)"
That's all. Enjoy your AlmaLinux as well.