Search Our Database
Transitioning from CentOS 7 to RHEL 8-Compatible Distributions Using Elevate (DirectAdmin)
Introduction
This guide provides a step-by-step process for upgrading CentOS 7 to RHEL 8 compatible distributions such as Rocky 8 and AlmaLinux 8 which using Direct Admin as control panel by using the Elevate tool. Elevate allows for a seamless transition, ensuring that your system’s configuration and data are preserved.
Prerequisites
- A server running CentOS 7.
- Root or sudo access to the server.
- A stable internet connection for downloading packages.
- Perform a backup before starting the OS upgrade
Step-by-Step Guide
Step 1: System Update
1. Before proceeding with the upgrade, update your system to ensure all existing packages are up to date:
yum update -y reboot
2. Build the Direct Admin to the latest version:
cd /usr/local/directadmin/custombuild/ ./build update
Step 2: Installing Elevate
1. Install the Elevate RPM package to facilitate the upgrade:
cd ~ yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm
2. Next, choose and install the Leapp data package for your target OS. Replace <target-os-package> with the package corresponding to the operating system you wish to upgrade to:
yum install leapp-upgrade <target-os-package> -y
Choose from the following specific packages based on the target OS:
- leapp-data-rocky for upgrading to Rocky Linux.
- leapp-data-almalinux for upgrading to AlmaLinux.
- leapp-data-oraclelinux for upgrading to Oracle Linux.
- leapp-data-centos for upgrading to a higher version of CentOS.
For example, if you want to upgrade to AlmaLinux 8:
yum install leapp-upgrade leapp-data-almalinux -y
Step 3: Pre-Upgrade Check and Common Issue Resolution
1. Run a pre-upgrade simulation to detect potential issues:
leapp preupgrade
After completion, if got the warning in Red colour as per below,
Review the generated report in /var/log/leapp/leapp-report.txt. Address any inhibitors or required actions as specified in the report.
Common Issue: PAM Module pam_pkcs11:
The pam_pkcs11 module, used in CentOS 7 for integrating smart cards and other PKCS#11 tokens for user authentication, is no longer available in RHEL 8. Upgrading without addressing this module may lead to system lockout as it will not be available or functional in the new OS.
Resolution Steps:
1. Remove the pata_acpi module which can conflict during the upgrade:
sudo rmmod pata_acpi
2. Ensure remote root login is permitted temporarily for the upgrade process:
echo "PermitRootLogin yes" | sudo tee -a /etc/ssh/sshd_config
3. Confirm removal of the pam_pkcs11 module from the PAM configuration to avoid lockout issues:
sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True
After resolving the issues, run the pre-upgrade simulation again to confirm:
leapp preupgrade
4. Make sure the result is green before run the upgrade:
Step 4: Performing the Upgrade
Once all issues are resolved and the pre-upgrade check is successful, proceed with the actual upgrade:
leapp upgrade
Step 5: Reboot and Complete Upgrade
1. After the upgrade process, reboot the system:
reboot
It takes some time to boot up the server. Can go into the console to monitor. Can select the Elevate-Upgrade-Initramfs from the GRUB menu to continue the upgrade (The system normally will be automatically booted into it.). The system will reboot again after the process completes.
2. After booted into the server, check the server OS:
cat /etc/redhat-release
Conclusion
Upon completion, your system will be successfully upgraded to your chosen RHEL 8 compatible distribution. It is advisable to verify the functionality of all critical services post-upgrade.
For additional assistance or if you encounter any issues, please contact our support team at support@ipserverone.com