How to Migrate CentOS 8 to AlmaLinux

CentOS 8 is reaching its End of Life in December 2021. If you are using CentOS 8, you may need to consider migrating to other operating systems.

Other alternatives for CentOS 8 are AlmaLinux, Rocky Linux, and Oracle Linux. All of these are free and are based on RHEL 8.

AlmaLinux is released a migration script

https://github.com/AlmaLinux/almalinux-deploy

This script allows you to convert CentOS 8 to AlmaLinux.

WARNING: Make sure you take a full system backup before migrating.

Before migrating, make sure your system is up to date.

dnf update

If you get error, Error: Failed to download metadata for repo ‘appstream’, run

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

Reboot the server

reboot

Once the server is back online, we can run the AlmaLinux migration script to start the migration.

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

After the migration is complete, run

dnf distro-sync -y 

Now you need to reboot the server

reboot

Comments

Leave a Reply

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