Upgrade from CentOS 7 to AlmaLinux 8: A Step-by-Step Guide

This article provides a detailed guide on how to upgrade from CentOS 7 to AlmaLinux 8. Before starting the process, we recommend creating a snapshot of your machine to ensure you can recover in case of any issues.

Prerequisites

  • Make sure your cPanel is up to date by running the following command:
    SHELL Copy
                    
    /scripts/upcp
                    
                
  • This process will cause downtime for your websites/webshops, so plan accordingly.

Step 1: Download the Elevate-Cpanel Script

Download the `elevate-cpanel` script using the following command:

SHELL Copy
        
wget -O /scripts/elevate-cpanel https://raw.githubusercontent.com/cpanel/elevate/release/elevate-cpanel; chmod 700 /scripts/elevate-cpanel
        
    

Step 2: Run the Check

Run the check to identify any potential issues:

SHELL Copy
        
/scripts/elevate-cpanel --check
        
    

This will output a list of warnings and information about your system.

Step 3: Upgrade MySQL (if necessary)

If you're using an older version of MySQL, you may need to upgrade it before proceeding. Run the following command to upgrade MySQL:

SHELL Copy
        
/usr/local/cpanel/bin/whmapi1 start_background_mysql_upgrade version=10.6
        
    

Step 4: Re-Run the Check

After upgrading MySQL (if necessary), re-run the check to ensure everything is ready for the upgrade:

SHELL Copy
        
/scripts/elevate-cpanel --check
        
    

Step 5: Start the Upgrade

If there are no issues, start the upgrade process:

SHELL Copy
        
/scripts/elevate-cpanel --start
        
    

Step 6: Monitor the Status

After the reboot, you can monitor the status of the upgrade using the following commands:

SHELL Copy
        
/scripts/elevate-cpanel --status
/scripts/elevate-cpanel --log
        
    

Step 7: Verify the Upgrade

Once everything is complete, verify that you can log in to WHM and cPanel.

Debug Functions

The following debug functions are available:

  • Start the upgrade: /usr/local/cpanel/bin/whmapi1 start_background_mysql_upgrade version=10.6
  • Check the status: whmapi1 background_mysql_upgrade_status upgrade_id=mysql_upgrade.<date>-<time> Replace <date> and <time> with the output from the previous command.
  • View the log live: tail -f /var/cpanel/logs/mysql_upgrade.<date>-<time>/unattended_background_upgrade.log

Conclusion

Upgrading from CentOS 7 to AlmaLinux 8 is a complex process, but by following these steps and using the provided debug functions, you can ensure a smooth transition. Remember to plan for downtime and create a snapshot of your machine before starting the upgrade.

Was this article helpful?
1 out of 1 found this helpful