How to Install cPanel on CentOS 7

Cpanel is a web based server control center used to simplify server management. In this article, you’ll learn how to install cPanel on a CentOS 7 server.

Prerequisites

cPanel account
Fresh CentOS 7 server

Prepare the server

First thing we want to do is make sure the server is fully up to date.

yum update -y

Next, create a fully qualified host name. Be sure to replace the “example.com” portion with your own domain.

hostnamectl set-hostname server.example.com

The installation script can take a long time so cPanel recommends using screen as precaution against disconnects. We’ll install it with the command below.

yum install screen -y

Start screen:

screen

Once screen is running, if you loose connection to your server, just ssh back in and run screen -r to get back to your session.

Installing cPanel

This command will download and run the installation script. cPanel says this can take up to three hours to run. So grab some lunch and be patient.

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

Once the installation has finished, navigate to https://ipaddress:2087 to log in.

Leave a Reply

Your email address will not be published. Required fields are marked *