Migrating CentOS 8 to Rocky Linux 8 or AlmaLinux 8 using orcharhino

Recently Red Hat has ceased support for CentOS 8 with the end of 2021. Therefore people have been looking for alternatives. Two of the most famous ones are Rocky Linux 8 and AlmaLinux 8 which both represent binary compatible distributions based on Red Hat.

This makes it easy to perform an inplace conversion of CentOS 8 servers to Rocky Linux or AlmaLinux and continue using the same servers as before. With orcharhino this conversion can be done even a bit easier:

First of all make sure that your system is up-to-date with respect to the latest available version of CentOS 8:
#yum update -y

Remove the CentOS-specific packages without dependencies:
#rpm -e --nodeps centos-gpg-keys centos-linux-release centos-linux-repos

(Re)subscribe to orcharhino with force using the appropriate activation key for Rocky Linux/AlmaLinux:
#subscription-manager register --org= --activationkey= --force

Install the Rocky Linux or respectively the AlmaLinux release:
#yum install -y rocky-release rocky-repos


#yum install -y almalinux-release

Empty the created upstream repositories on your server:
#find /etc/yum.repos.d -name "Rocky*.repo" -exec rm {} ; -exec touch {} ;


#find /etc/yum.repos.d -name "alma*.repo" -exec rm {} ; -exec touch {} ;

Perform a yum distro-sync on your server:
#yum distro-sync -y

Reboot your machine.
When your machine comes back online you have successfully converted your CentOS 8 server to a Rocky or an AlmaLinux server.

The following two tabs change content below.

Fabrice Brimioulle

IT-Consultant, ATIX AG