Install and Setup cPanel/WHM on CentOS 7,8

Exported on 24-Sep-2021 12:52:19

Install WHM/cPanel On CentOS Server With AttuneOps

This Blueprint Installs WHM/cPanel On A CentOS Server

cPanel & WHM allows hosting providers and users the ability to automate server management tasks while offering their customers the tools they need to manage their websites, databases, email addresses and cron-jobs etc.

cPanel is number 1 tool in hosting management control panel segment, WHM is the admin panel that ships with it and has the ability to connect multiple server nodes to it.

Pre-Blueprint Attune setup
  1. On the Inputs tab, create a Linux node for the host you wish to install the stack on.
  2. On the Inputs tab, create Linux credentials to connect to the host you wish to install the stack on.
Steps Involved
  • Download cPanel installer.
  • Configure screen package.
  • Launch the installer in background.

Parameters

Name Type Script Reference Default Value Comment
Linux Node Linux / Unix Server linuxNode
Linux User Linux OS Credential linuxUser

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