CentOS 7 to AlmaLinux 8 migration
As CentOS 7 is becoming close to EOL(currently June 2024) and CentOS 8 moved to a different model the sysadmins have to choose to migrate to CentOS 8 stream or search an alternative (RHEL 8 or other).
My choice was AlmaLinux 8 and I choose it for the speed of delivery and the community support.
The process is straightforward and in most case will be:
Update CentOS to the latest patches
$ sudo yum update
If there are updated packages reboot to apply them.
$ sudo reboot
Install ELevate repository
$ sudo yum install http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm
Install following packages if you want to update to AlmaLinux
$ sudo yum install -y leapp-upgrade leapp-data-almalinux
NOTE: In this step you can also replace leapp-data-almalinux with: leapp-data-centos to update to CentOS; leapp-data-rocky for RockyLinux or leapp-data-oraclelinux for OracleLinux
Next step is to start preupgrade check
$ sudo leapp preupgrade
This takes some time
At the end in the ideal case you will have a pass, but in most cases there are errors that can be seen in var/log/leapp/leapp-report.txt
Most common ones are unsupported kernel modules that can be resolved by
$ sudo rmmod pata_acpi
or missing answer file for pkcs11 pam module
$ sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True
in some cases also
PermitRootLogin yes
have to be added to sshd_conf
Read the report for details and hints
After all is resolved start the upgrade
$ sudo leapp upgrade
And if all is good reboot
$ sudo reboot
This process is long, and you should watch the console if possible to catch eventual errors.
At the end you will have running system
Notes: I had issues with 3-d party repositories and packages during the upgrade. I had to remove and reinstall after the upgrade nginx, nodejs and docker-ce. As usual my advice will be to test before doing the change in production and always have your backup ready.
Leave a Reply
You must be logged in to post a comment.