How to install/setup cPanel in Centos 7

### **How to Install cPanel/WHM on CentOS

**

 

Installation of cPanel/WHM

Before installing cPanel you must have Perl installed on your server as cPanel is written in Perl. To install Perl on your system, login as root user and run the following command.

```

yum -y install perl

```

 

Now you will need to set the hostname for your server. A hostname is a FQDN or Fully Qualified Domain Name which will be used to identify your server. For example consider vps.mydomain.com - this is a FQDN which you can use as your hostname. To change your hostname run the following command

```

hostname vps.mydomain.com

```

 

You can replace vps.mydomain.com with your hostname. You must own the domain of which your are setting up the hostname and then Download the installation script from cPanel website by executing the following command

```

cd /home

curl -o latest -L https://securedownloads.cpanel.net/latest

sh latest

```

This will start your cPanel installation, you can now sit back and relax as the installation takes around half hour to complete. Once the installation script is finished you will see the following output:

> 2016-06-11 08:42:33 222 ( INFO): cPanel install finished in 21 minutes and 23 seconds!

> 2016-06-11 08:42:33 938 ( INFO): Congratulations! Your installation of cPanel & WHM 11.56 is now complete. The next step is to configure your server.

> 2016-06-11 08:42:33 938 ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087.

 

And after the installation script is finished then lastly run your license command

```

rm -rf installer

rm -rf setup

curl -L -o "installer" "securedownloads.cpanel.net.pk/latest/cpanel/installer?key=cpanel"

chmod +x installer

./installer

```

```

licensecp

```

```

installssl

```

After done you can now open your browser and go to https://your-server-ip:2087 to access WHM. Login with username root and your root account's password. Make sure that you use https to access WHM in browser. For example if your IP is 192.168.0.85 then you will have to go to https://192.168.0.85:2087

  • 1 Пользователи нашли это полезным
Помог ли вам данный ответ?