In 2020, The CentOS Project, in coordination with Red Hat, announced that it would shift full investment to CentOS Stream, the upstream development platform for upcoming Red Hat Enterprise Linux releases. That mean that will be no more alligned to the production version of Red Hat Enterprise.
As a result, CentOS Linux 7 has reached end of life (EOL) on June 30, 2024.
One of the possible CentOS Linux alternative can be Rocky Linux.
If you start from CentOS 7 maybe is better to just rebuild your system or build a new one (but is still possible migrate to Rocky Linxu 7).
If you start from CentOS 8 could be possible use an in-place migration script build by Rocky Linux and convert your system. Of course, could be better start from a new clean system, but is not always applicable and sometime the in-place option could be interesting.
How to migrate (in-place) to Rocky Linux from CentOS 8
There is a great migration tool availble on https://docs.rockylinux.org/guides/migrate2rocky
It can convert a CentOS Stream, CentOS, AlmaLinux, RHEL, or Oracle Linux system to Rocky Linux (with same version).
All commands should be run as root. Either log in as root, or have the ability to elevate privileges with sudo
(for example, using sudo su -).
First to all make a full backup of your system, or take a snapshot in case is running on a VM or on a cloud IaaS.
You must start already from an updated version (for example CentOS 8.10).
And the first problem could be having working repositories, expecially for a CentOS 8. There is a great blog post that explain how to fix them.
But basically you can run those commands:
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum update -y --allowerasing
Now you can download script and fix its permission. There are different way to download, but if your system can reach Internet, my preferred way is this:
cd
curl https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh -o migrate2rocky.sh
chmod u+x migrate2rocky.sh
And finally you can run the script and the magic will appen:
./migrate2rocky.sh -r
There can be some errors like in the screenshot, but the installation of Reocky Linux packages will start
…..
python3-decorator-4.2.1-2.el8.noarch
python3-gobject-base-3.28.3-2.el8.x86_64
python3-hwdata-2.3.6-3.el8.noarch
python3-netifaces-0.10.6-4.el8.x86_64
python3-ply-3.9-9.el8.noarch
python3-pyOpenSSL-19.0.0-1.el8.noarch
python3-pycparser-2.14-14.el8.noarch
python3-pyudev-0.21.0-7.el8.noarch
python3-schedutils-0.6-6.el8.x86_64
python3-six-1.11.0-8.el8.noarch
readline-7.0-10.el8.x86_64
rootfiles-8.1-22.el8.noarch
slang-2.3.2-3.el8.x86_64
snappy-1.1.8-3.el8.x86_64
xkeyboard-config-2.28-1.el8.noarch
Complete!
Done, please reboot your system.
A log of this installation can be found at /var/log/migrate2rocky.log
After the reboot you will have a new Rocky Linux 8.10.