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.
1 |
dnf update |
If you get error, Error: Failed to download metadata for repo ‘appstream’, run
1 2 3 |
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
1 |
reboot |
Once the server is back online, we can run the AlmaLinux migration script to start the migration.
1 2 |
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh bash almalinux-deploy.sh |
After the migration is complete, run
1 |
dnf distro-sync -y |
Now you need to reboot the server
1 |
reboot |