Migrating From CentOS 8 to AlmaLinux 8 Simplified

Migrating From CentOS 8 to AlmaLinux 8 uses an automatic script to smoothly update your system without reinstalling, preserving data and system settings safely through simple terminal commands.

🤖AI Overview:

Migrating From CentOS 8 to AlmaLinux 8 is an essential upgrade due to CentOS 8’s end of life. AlmaLinux offers a stable, RHEL-compatible alternative with long-term support. This migration can be performed easily using an automated script that updates your system without data loss or reinstalling the OS, ensuring minimal downtime and compatibility.

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

Conclusion

Migrating From CentOS 8 to AlmaLinux 8 is a strategic choice to maintain a secure, stable, and supported server environment after the CentOS 8 end of life.

AlmaLinux offers a seamless transition with binary compatibility to RHEL and an active support community. Using either the automatic migration script or manual process, users can confidently upgrade their systems while preserving data integrity and minimizing downtime.

Proper preparation through backups, verifying prerequisites, and following the step-by-step instructions outlined in this guide will ensure a smooth migration experience.

Should you encounter any challenges during the migration, consult the AlmaLinux community resources or seek professional assistance to address specific scenarios.

By migrating to AlmaLinux 8, you invest in the continued reliability and performance of your Linux systems well into the future.

FAQ

Yes, an automated script called almalinux-deploy.sh converts CentOS 8.3+ installations to AlmaLinux 8 safely.

You need CentOS 8.3 or newer, root or sudo access, 5 GB free disk space, a stable internet connection, and should backup your data.

Typically about two hours, depending on hardware and network speed.

No, upgrade CentOS to 8.3 or newer before starting migration.

Yes, but it's more complex and recommended for advanced users only.

Run commands like "lsb_release -"a or "cat /etc/redhat-release" to confirm AlmaLinux is installed.

Yes, using the official migration script keeps your data and settings intact, but backing up is recommended.

Yes, AlmaLinux 8 is binary compatible with RHEL 8, supporting most CentOS 8 applications.

Use AlmaLinux community forums, official docs, and Linux user groups for guidance and troubleshooting.

Leave a Reply

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