Migrate/Convert CentOS 7 to Rocky Linux 8
Rocky Linux is a derivative of Red Hat Enterprise Linux. Rocky Linux was conceived after the announcement that CentOS would be focusing on CentOS Stream. Discontinuing the CentOS project as we know it. After this announcement, one of the original creators of the CentOS project spawned Rocky Linux. On their website, they state “Rocky Linux is an open-source enterprise operating system designed to be 100% bug-for-bug compatible with Red Hat Enterprise Linux®. It is under intensive development by the community.” As in our article, Convert a CentOS 7 VPS to an AlmaLinux 8 VPS. In this article, we will repeat the process but this time we will Migrate a High Availability VPS Server from CentOS 7 to Rocky Linux 8.
Convert/Migrate From CentOS 7 To Rocky Linux 8
You need to ensure all of the packages are up-to-date on the system you are migrating to Rocky Linux 8. So issue the update command followed by the reboot command to boot into the latest Kernel if not already used.
yum update -y && reboot
Install Elevate
As in our other blog post, Elevate is the utility used to migrate between Red Hat Enterprise Linux derivatives. Consequently, this bit of the process is the same for all RHEL-based Operating Systems. For the purpose of this guide, we have shortened the process.
yum install http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm -y && yum install leapp-upgrade leapp-data-rocky -y
Preflight Check
Now we must run a dependency check. If you do not run this the migration from CentOS 7 to Rocky Linux 8 will fail. The dependency check will fail by default.
leapp preupgrade
Now issue the below commands to resolve the default dependency errors.
rmmod pata_acpi && echo PermitRootLogin yes | tee -a /etc/ssh/sshd_config && leapp answer --section remove_pam_pkcs11_module_check.confirm=True
If you run another pre-upgrade command in the console, at this point you should see this.
Start Migration/Convert CentOS 7 to Rocky Linux 8
leapp upgrade
Once complete, reboot and check that the system has been converted to Rocky Linux 8.
cat /etc/redhat-release Rocky Linux release 8.8 (Green Obsidian)