Upgrade from CentOS 7 to AlmaLinux 8

We are going to upgrade to AlmaLinux 8, before we are going to start this process We recommend to make a snapshot from your machine first.
Read the following article
 HowTo - Create a snapshot
This process will take down your cPanel instants to make sure you are able to have some downtime for your websites/webshops.
 
Make sure your cPanel is up to date, you can check this with the following command
/scripts/upcp
 
1.  download the elevate-cpanel script
wget -O /scripts/elevate-cpanel https://raw.githubusercontent.com/cpanel/elevate/release/elevate-cpanel; chmod 700 /scripts/elevate-cpanel
 
2. Lets run the check and see the output
# Check upgrade (dry run mode)
/scripts/elevate-cpanel --check
 
2. Output of the check, we need to upgrade MySQL because the version we use is not available. Lets do that first after we continue.
* 2024-04-25 04:50:16 [WARN] OpenSSH configuration file does not explicitly state the option PermitRootLogin in sshd_config file, which will default in RHEL8 to "prohibit-password".
  We will set the 'PermitRootLogin' value in /etc/ssh/sshd_config to 'yes' before upgrading.

* 2024-04-25 04:50:41 [WARN] You have MySQL 5.7 installed.
  This version is not available for AlmaLinux 8.

* 2024-04-25 04:50:41 [INFO] You can manually upgrade your installation of MySQL using the following command:

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

  Once the MySQL upgrade is finished, you can then retry to elevate to AlmaLinux 8.

* 2024-04-25 04:51:05 [INFO] Checking EasyApache profile compatibility with AlmaLinux 8.
* 2024-04-25 04:51:05 [INFO] Running: /usr/local/bin/ea_current_to_profile --target-os=CentOS_8 --output=/tmp/QYoxq_jR9C/ea_profile.json
* 2024-04-25 04:51:29 [INFO] Backed up EA4 profile to /tmp/QYoxq_jR9C/ea_profile.json
* 2024-04-25 04:52:17 [WARN] Elevating with Sectigo as the provider for AutoSSL is not supported.
If you proceed with this upgrade, we will switch your system
  to use the Let's Encrypt™ provider.

* 2024-04-25 04:52:17 [INFO] There are no known blockers to start the elevation process.
You can consider running:
    /scripts/elevate-cpanel --start
3. To start with the upgrade we get the command that we have to run.
$ /usr/local/cpanel/bin/whmapi1 start_background_mysql_upgrade version=10.6
 
4. After we have updated it, we're going to run the check again.
$ /scripts/elevate-cpanel --check
 
5. It should look like this
* 2024-04-25 05:52:33 [WARN] OpenSSH configuration file does not explicitly state the option PermitRootLogin in sshd_config file, which will default in RHEL8 to "prohibit-password".
We will set the 'PermitRootLogin' value in /etc/ssh/sshd_config to 'yes' before upgrading.

* 2024-04-25 05:52:33 [INFO] Successfully verified signature for cpanel (key types: release).
* 2024-04-25 05:52:41 [INFO] Checking EasyApache profile compatibility with AlmaLinux 8.
* 2024-04-25 05:52:41 [INFO] Running: /usr/local/bin/ea_current_to_profile --target-os=CentOS_8 --output=/tmp/OA2Cpjl9d8/ea_profile.json
* 2024-04-25 05:52:44 [INFO] Backed up EA4 profile to /tmp/OA2Cpjl9d8/ea_profile.json
* 2024-04-25 05:52:49 [WARN] Elevating with Sectigo as the provider for AutoSSL is not supported.
If you proceed with this upgrade, we will switch your system
  to use the Let's Encrypt™ provider.

* 2024-04-25 05:52:49 [INFO] There are no known blockers to start the elevation process.
You can consider running:
      /scripts/elevate-cpanel --start
 
6. This means we can start the upgrade, so lets run the command
$ /scripts/elevate-cpanel --start
 
7. After the reboot, please wait you can login and check the status by typing the following
$ /scripts/elevate-cpanel --status
# To see the live log
$ /scripts/elevate-cpanel --log
 
8. Once everything is done, you are able to login to WHM + cPanel.
   Keep in mind that this will cause downtime for your websites.
 
DEBUG FUNCTIONS
First one is to start the upgrade
$ /usr/local/cpanel/bin/whmapi1 start_background_mysql_upgrade version=10.6

---
data:
upgrade_id: mysql_upgrade.20240425-053135
metadata:
command: start_background_mysql_upgrade
reason: OK
result: 1
  version: 1
 
To check the status, make sure to replace [mysq_upgrade.20240425-053135] with the output you see at [date: upgrade_id: mysql_upgrade.xxxxxxxx-xxxxxx]
$ whmapi1 background_mysql_upgrade_status upgrade_id=mysql_upgrade.20240425-053135
 
To view the log live
$ tail -f /var/cpanel/logs/mysql_upgrade.20240425-053135/unattended_background_upgrade.log
 
Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Articles in this section

See more