Setting up cPanel/WHM on CentOS

Exported on 23-Aug-2021 15:25:21

This script installs WHM & cPanel server management suit on CentOS and supported linux distributions

Parameters

Name Type Script Reference Default Value Comment
s1 Linux / Unix Server s1
s1c Linux OS Credential s1c

1 - Refresh packages

Refresh yum packages

The connection details have changed from the last step.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
sudo yum -y update

2 - Download cpanel & whm installer

Download latest version of the WHM & cPanel installer into /home directory

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
cd /home && sudo curl -o latest -L https://securedownloads.cpanel.net/latest

3 - Install Screen

Install screen package, used to run the installation in background

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
sudo yum -y install screen

4 - Enable Screen Zombie Mode

Enable Zombie mode in screen, it helps keep the screen window alive even after installer has finished or exited due to an error.

To connect to the screen window to check for errors and progress, use the following command: screen -x

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
sudo echo "zombie xy" >> ~/.screenrc

5 - Start Installation In Background

Installation usually takes about 20 minutes.

To check status of the installation, ssh into the server and run the following command: screen -x

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
screen -d -m sudo sh /home/latest