Migrating From CentOS 8 to AlmaLinux 8

Migrating From CentOS 8 to AlmaLinux 8

Linux users are well aware that CentOS 8 was discontinued on December 31, 2021, and Redhat officially announced the end of life of CentOS8. This news was very sad and bitter for CentOS fans. Redhat company talked about focusing on the CentOS stream, but this distribution could not meet the needs of CentOS 8 users and was not very successful in getting the satisfaction of CentOS users. Many experts were trying to release an alternative distribution for CentOS 8, the cloudlinux development team gave users hope of a great distribution release to replace the CentOS 8 operating system and released Alma Linux.

Alma Linux is a distribution of Redhat Linux Enterprise Linux developed as an alternative to CentOS. The current version of Alma Linux, which is based on RHEL8.3, has been provided to users to correct the weaknesses of the stable version of CentOS.

With the release of Alma Linux, CentOS 8 users became eager to use and install Alma Linux on their Linux system, and it was time to move to the upstream development branch of RHEL. The problem was that many users do not know how to migrate from CentOS8 to Alma Linux and are looking for a useful tutorial to change from CentOS8 to Alma Linux and benefit from the advantages of the Alma Linux operating system.

This article will teach you how to change from CentOS to Alma Linux step by step by just entering a few commands and it will accompany you on this path to easily experience the Alma Linux operating system on your system by following the provided instructions. If you want to migrate from CentOS8 to Alma Linux, follow us to the end of the article.

How to migrate from CentOs8 to Alma Linux8

This tutorial is for situations where your system is running CentOS8 and you want to switch from CentOS 8 to Alma Linux8. Otherwise, to benefit from the Alma Linux operating system, you can follow the instructions on how to install Alma Linux and easily use the Alma Linux operating system.

In transferring the CentOS8 operating system to Alma Linux, in order not to experience failure and data loss, try to consider the integrity of the steps. It is also better to back up your data and files before you start the transfer process.

Fortunately, there are scripts for automatic migration from CentOS8 to Alma Linux that eliminate the need to wipe the previous operating system and install the new operating system and you can easily migrate from CentOS 8 to the latest version of AlmaLinux 8.5 through scripts available on GitHub or Oracle Linux scripts. In the following, we will guide you on how to migrate from CentOS8 to Alma Linux through an automatic migration script.

prerequisites

  • Linux VPS with CentOS8 operating system (note that to transfer to Alma Linux, at least CentOS 8.3 version must be running on the Linux VPS. A lower version will encounter an error.)
  • Having Root user permissions and logging into the Linux system through the Sudo command.
  • At least 5 GB of hard disk space to download and reinstall operating system files.
  • Ensuring a high-speed and stable Internet connection.

If you are using a version lower than CentOS 8.3 on your Linux VPS, you will encounter the following error when switching to Alma Linux:

migrating from CentOs8 to Alma Linux8

 

  • Method 1: How to migrate from CentOS8 to Alma Linux via migration script

In this method, we are going to migrate from CentOs8 to Alma Linux8 via the almalinux-deploy script which is available for download on GitHub. This script relies on integration like the migration of other applications such as DirectAdmin, cPanel, and Plesk. If you are ready, let’s start the transfer process.

Step 1: Downloading the transfer script to AlmaLinux

First, enter the terminal environment of the Linux system and start the process by downloading almalinux-deploy. sh from the AlmaLinux Github page using the curl command:

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

To assign execute permissions to the transfer script, enter the following command:

$ chmod +x  almalinux-deploy.sh

Step 2: Running the transfer script as the root user

To migrate to Alma Linux, you need to enter the following command using sudo privileges to run the almalinux-deploy.sh script:

$ sudo bash almalinux-deploy.sh

migrating from CentOs8 to Alma Linux8

Running this script will perform basic system checks and start removing, reinstalling, and upgrading some packages to synchronize the system with AlmaLinux 8.5.

migrating from CentOs8 to Alma Linux8

After the migration process is completed, which may take you a little while (approximately 2 hours), you will receive a message announcing the successful migration to Alma Linux.

migrating from CentOs8 to Alma Linux8

Step3: rebooting the system

Finally, you need to reboot the system and load AlmaLinux via the following command:

$ sudo reboot

After entering the above command, you will see the following page:

migrating from CentOs8 to Alma Linux8

After some time you will see the Alma Linux grub menu on the screen, you need to press enter to initialize the system and wait for a while.

migrating from CentOs8 to Alma Linux8

Then you will come across the login page where you have to enter the password and then click on the Sing In option so that you can enter the world of wonders of Alma Linux.

migrating from CentOs8 to Alma Linux8

And finally, the attractive desktop background of Alma Linux announces your entry into the lovely world of Alma Linux. We hope that with Alma Linux you can achieve your goals and have a good experience using Alma Linux.

To check the running version of Alma Linux, you can use the following command:

$ lsb-release -a

$ cat /etc/redhat-release

Also, by running the following command, make sure the system is automatically set to boot the Alma Linux kernel :

# grubby --info DEFAULT | grep AlmaLinux

title="AlmaLinux (4.18.0-240.el8.x86_64) 8"

If you have followed the migration steps correctly, you will not encounter any errors and you can successfully migrate from CentOS to Alma Linux.

  • Second method: manual migration from CentOS8 to Alma Linux

This method is older and more difficult compared to the previous method, and the first method replaced the manual method. Some users may prefer this method for various reasons, but most users follow the first method to migrate from centOS8 to Alma Linux. Knowing this method comes with advantages, you can use it as an alternative method in certain situations.

Step 1: Update CentOS

First, enter the command line terminal and update the CentOS packages by running the following command:

$ sudo dnf update -y

Step 2: Restart the system

To apply the changes (especially the new packages related to the kernel) you need to restart the system by typing the following command:

$ sudo reboot

Step 3: Remove additional CentOS packages

At this stage, it is better to free the CentOS system from non-user packages. If you are using the Gnome desktop environment, you can remove additional packages such as CentOS wallpapers and other packages, and if you are using a graphical interface, then enter the following command:

$ sudo rpm -e --nodeps centos-backgrounds centos-indexhtml centos-gpg-keys centos-linux-release centos-linux-repos centos-logos

To remove all CentOS packages if you are not using the GNOME GUI, the following command is used:

$ sudo rpm -e --nodeps centos-gpg-keys centos-linux-release centos-linux-repos

Step 4: In this step, download the latest Alma Linux release package by running the command below:

$ sudo rpm -ivh https://repo.almalinux.org/almalinux/8.5-beta/BaseOS/x86_64/os/Packages/almalinux-release-8.5-2.el8.x86_64.rpm

Step 5: After the installation process is completed successfully, use the following command to complete the migration process from CentOS to Alma Linux.

$ sudo dnf distro-sync -y

After running the above command, many packages will be installed or removed, and some packages will be upgraded, so this process will take some time.

Step 6: Finally, after the process is complete, via the following command, restart the system and load Alma Linux :

$ sudo reboot

Alma Linux is selected by default when booting. If not, select Alma Linux manually.

Congratulations on your entering the world of Alma Linux, you have successfully migrated from centOS8 to the latest version of Alma Linux and now you can enjoy the Alma Linux operating system.

To ensure the completion of the migration process to Alma Linux, you can run the following command:

hostnamectl

FAQ

The first and best option in the list of CentOS8 alternatives is undoubtedly Alma Linux, which is an open-source server operating system.

Then we can suggest Rocky Linux, which is a free and server-oriented distribution of Linux, and also Ubuntu, OpenSUSE, Oracle Linux, and Debian are other excellent alternatives to CentOS8. You should make the right choice between these options according to your needs.

Unfortunately, RedHat officially announced the end of life of CentOS8 in 2021 and introduced CentOS Stream as an upstream branch of Red Hat Enterprise Linux.

CentOS stream 9 will be a new and updated distribution of the original version of CentOS Stream, which will be developed and supported by RHEL and the community.

Conclusion

In this article, we taught two ways to transfer from CentOS8 to Alma Linux8. Naturally, transferring from CentOS8 to Alma Linux via script is easier than the manual method, but we have taught both methods so that you can replace these methods in certain situations.

But automatic migration scripts to synchronize with Alma Linux remove or upgrade necessary packages and install new packages and make the process easier for you because the script takes over the main tasks and management of the migration.

We hope that this training was useful for you, if you encounter any problem in any part and have a question, please let us know in the comments section so that we can solve your problem as soon as possible.

Thank you for your good choice.

Leave a Reply

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