Skip to content

Step-by-step instructions for migrating from CentOS 8 to AlmaLinux

Step 1. Backup

You need to back up the server or important directories on it.

Step 2: Verification of version's match

Before running the migration script, you should check the version of the operating system. CentOS must be at least 8.3. Otherwise, you need to register the addresses of mirrors with packages for updating, as indicated in the Step 3 paragraph , and run the command

dnf update -y

CentOS images can be downloaded at the link. The system will be upgraded to CentOS Linux release 8.5.2111.

Otherwise, an error will occur:

Step 3. Adding mirrors (if the system is under than Centos 8.5)

If the OS has not been updated for a long time, you need to add archive mirrors for CentOS 8:

sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sudo sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*

Step 4. Download the script for migration:

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

Step 5. Grant execution rights for the script:

chmod +x almalinux-deploy.sh 

Step 6. Execute a script starting the downloading and installing packages:

sudo bash almalinux-deploy.sh

Below is an example of a pre-migration check. There are no problems with package dependencies and operating system version:

Step 7: Completion of the installation and reboot

In case of successful installation, the following message will appear:

After the installation is complete, you should reboot the system with the command reboot.

In case of successful migration, AlmaLinux will be present in the list at the system boot time and kernel selection:

Step 8. Finding errors

After rebooting the system, you need to check for errors, as well as the name and version of the system:

  1. cat /etc/redhat-release – allows you to check the transition to AlmaLinux:

  2. dmesg - check for hardware errors;

  3. journalctl - errors in the system.

Step 9. Verification of the services' operation

After the migration is completed, you should check the correct operation of all services that were installed and configured before switching to AlmaLinux.