How do I configure failover on a cPanel instance running on AlmaLinux8?
In the guide for Configuring Failover on a Compute Instance, the instructions provided for CentOS/RHEL distros show how to configure the shared IP with Network Manager. I am using AlmaLinux 8 on a recently-deployed instance created from the cPanel Marketplace App. The problem is that Network Manager is disabled for this (and other) distro versions by the cPanel and WHM installer. How do I configure failover for my cPanel server?
1 Reply
I tested this out using the Marketplace app and was able to add the shared IP to the lo interface using the instructions below which I found on this CentOS forum. You'll want to run these as a sudo user or as root.
First, you'll still need to follow the rest of the instructions in our Failover guide, including disabling Network Helper for the server. When you get to the section about adding the shared IP to the networking configuration, you can try running the following commands:
First, using your preferred text editor to add the following configuration file. I used nano with the following command:
sudo nano /etc/sysconfig/network-scripts/ifcfg-lo:10
Then add the following text to that file, filling in your own information for the IP, Network, and Broadcast. For IP I used the shared IP. For Network, I used the gateway for that IP by changing the last section of the IP to a 1. For the Broadcast I changed the last section to 255. Everything else, like the prefix and device, can be copied and pasted directly from this configuration.
Your file should look something like this:
DEVICE=lo:10
IPADDR= 111.222.33.444
PREFIX=32
NETMASK=255.255.255.0
NETWORK= 111.222.33.1
BROADCAST= 111.222.33.255
ONBOOT=yes
NAME=lo10
Next, I ran the following commands:
ifup lo:10
ifconfig lo:10
I then went back to the failover guide, starting with the steps for configuring lelastic.
After lelastic was set up, I tested failover and it worked as intended. While I didn't try it with Rocky Linux or CentOS, if you're stuck with setting up failover on an older RHEL distribution running cPanel, it might be worth looking into this as an option.