HomeLinuxEven a noob can do it: The cPanel ELevate Project

Even a noob can do it: The cPanel ELevate Project

JasmineDirectory.com was running on a VPS powered by LiteSpeed, WHM, and Cloudflare. After updating to the latest PHP version (8.2) last year, I decided it was time to finally upgrade the server from CentOS to AlmaLinux, especially since WHM will be discontinuing support for CentOS.

ATTENTION: Do not use Putty to access the server vis your current SSH server because during the upgrade that existing SSH server will be wiped. So you need access to the server’s console via a VNC viewer.

Naturally, before beginning this task, our technical team created backups of both the server and the accounts. As described here, the first steps are the same for everyone:

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

Pre-upgrade checks

/scripts/elevate-cpanel --check --upgrade-to=almalinux

If everything is fine, you can proceed to the next step.

The actual upgrade

/scripts/elevate-cpanel --start --upgrade-to=almalinux

From now on, everything went (mostly) smooth. All you need is patience. If the cPanel elevation script fails for any reason, the upgrade will stop, everything will roll back to the pre-upgrade status.

First issue: Stage 2

Cannot find a valid baseurl for repo: base/7/x86_64

How to resolve this issue?

Use an editor like vi or nano. I use vi.

vi /etc/yum.repos.d/CentOS-Base.repo

Look for the [base] section, try uncommenting the baseurl by removing the leading # on the baseurl line as shown in the following screenshot.

Type I to enter in edit/insert mode, delete the # sign, type ESC to escape from the edit mode, than :wq to sale and exit vi.

After that, simply type this command:

/scripts/elevate-cpanel –continue

I am using a VNC and the elevation supposedly should happed as I write this post.

However, at some point, all I saw was this:

Note: The elevator= kernel parameter is deprecated.

I just waited (haven’t panicked AT ALL…), and the error disappeared, the elevation continued.

With Ctrl+C you exit the elevation process and you can check whats going on with this command:

/scripts/elevate-cpanel --status

In my case it was Stage 4 out of 5, so I switched to the log file to see what’s going on in real time.

/scripts/elevate-cpanel –log

 

Now, the process is stuck at:

[19:00] [Server1.jasminedirectory.com *] # /scripts/elevate-cpanel --log

# -----------------------------> [INFO] # Monitoring existing rmupggrade (stage=4) ; Running: tail -f /var/log/elevate-cpanel.l

og

* 2024-03-30 14:36:41 (5551) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO] Running: /usr/bin/systemctl stop mysql

* 2024-03-30 14:36:41 (5551) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO] Failed to stop mysql.service: Unit mysqld.service not loaded.

* 2024-03-30 14:36:41 (5551) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO] Running: /usr/bin/systemctl enable tailwatchd

* 2024-03-30 14:36:41 (5551) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO] Created symlink /etc/systemd/system/multi-user.target.wants/tailwatchd.service -> /etc/system

d/system/tailwatchd.service.

* 2024-03-30 14:36:41 (5551) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO] Running: /usr/bin/systemctl stop tailwatchd

* 2024-03-30 14:36:41 (5551) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO] Running: /scripts/restartsrv_tailwatchd --stop

* 2024-03-30 14:36:41 (5551) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO] Service “tailwatchd” is already stopped.

* 2024-03-30 14:36:41 (5534) [INFO] tailwatchd stopped successfully.

* 2024-03-30 14:36:41 (5551) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO] Running: /scripts/restartsrv_dovecot --stop

* 2024-03-30 14:36:41 (5534) [INFO] Service “dovecot” is already stopped.

* 2024-03-30 14:36:41 (5551) [INFO] dovecot stopped successfully.

* 2024-03-30 14:36:41 (5521) [INFO]

* 2024-03-30 14:36:41 (5534) [INFO] Running: /scripts/restartsrv_exim --stop

* 2024-03-30 14:36:41 (5551) [INFO] Service “exim” is already stopped.

* 2024-03-30 14:36:41 (5521) [INFO] Log Messages

* 2024-03-30 14:36:41 (5534) [INFO] 2024-03-30 18:37:27 exim 4.96.2 daemon started: pid=11627, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

* 2024-03-30 14:36:41 (5551) [INFO] exim stopped successfully.

* 2024-03-30 14:36:41 (5521) [INFO]

* 2024-03-30 14:36:41 (5534) [INFO] Running: /usr/bin/rm -rf /root/.cpanel/datastore

* 2024-03-30 14:36:41 (5551) [INFO]

* 2024-03-30 14:36:41 (5521) [INFO] Running: /usr/local/bin/ea_install_profile --install /etc/cpanel/ea4/profiles/custome/current.json --install ea_state_at_2024-03-30_14:12:59.mod ified_for_CentOS8.json

* 2024-03-30 14:36:41 (5534) [INFO]

* 2024-03-30 14:36:47 (5521) [INFO] * Warning! ignored package: ea-openssl11. It is in the profile’s package list but does not exist, has an installation state of uninstalled.

 

I patiently waited for about 45 minutes. The cPanel Elevate script resumed. Huh…

After an automatic reboot, the cPanel Elevate status showed 5/5. In this stage the script did some health checks.

After another reboot:

Now the WHM started to work as expected. The OS definitely has changed, however, the cPanel version did now, hence, I upgraded it manually.

Just let the Upgrade script do it’s job:

And voila:

As a side note, upgrading a server with cPanel from CentOS to AlmaLinux can become necessary for several reasons:

  1. End of Support for CentOS: cPanel announced that they would no longer support CentOS 8 after the operating system reached its end of life in December 2021. AlmaLinux is one of the operating systems recommended by cPanel as a replacement for CentOS.
  2. cPanel Compatibility: AlmaLinux is binary compatible with CentOS, which means it can serve as a direct replacement without the need for extensive reconfiguration of the server environment or software. This compatibility ensures that cPanel and other applications will function on AlmaLinux as they did on CentOS.
  3. Security: With the discontinuation of updates for certain CentOS versions, servers running those versions will no longer receive security patches or updates, potentially leaving them vulnerable to new security threats. Migrating to a supported operating system like AlmaLinux ensures ongoing security patches and updates.
  4. Long-Term Support: AlmaLinux is positioned as a stable, open-source, community-driven operating system with promised long-term support. This makes it a reliable choice for servers that require stable performance and support continuity.
  5. Community Support: Since the creation of AlmaLinux was a response to the early end of life for CentOS 8 and the shift of CentOS Stream to a rolling-release model, AlmaLinux has garnered significant community support. This community involvement can be crucial for resolving issues and ensuring a stable operating environment for cPanel and other applications.
  6. Software Updates: Regular software updates are essential for performance, security, and feature improvements. Using an operating system that receives regular updates ensures that the server remains compatible with the latest software releases, including cPanel updates.

By migrating to AlmaLinux, users of cPanel ensure their server environment remains secure, supported, and up to date, which is crucial for maintaining the integrity and performance of their websites and services hosted on the server.

LIST YOUR WEBSITE
POPULAR

Popular Kitchen Tile Trends & Styles in 2021 

Designing a functional and beautiful kitchen can become overwhelming, as there are so many decisions to make from appliances, lighting, right down to choosing your kitchen tiles. No matter what size kitchen you have, tile wall backsplashes and floor...

Advertisements on the Brain

Advertising has become a very powerful part of media all across the globe. If you are watching a one hour television program then generally there are at least fifteen minutes of commercials from start to finish. Have you ever asked...