Install WHM/Cpanel on Centos 7
cPanel is a Linux-based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides capabilities for administrators, resellers, and end-user website owners to control the various aspects of website and server administration through a standard web browser.
In addition to the GUI, cPanel also has command line and API-based access that allows third party software vendors, web hosting organizations, and developers to automate standard system administration processes.
What are the features of cPanel?
Some features of cPanel includes:
- Email System. Allows you to setup multiple emails for users, an online webmail, spam blocker and filters.
- Security. Secure websites with the tools to help reduce the possibility of attack. Third party security add-ons can also be installed.
- File Management. Allows you to graphically see files, folders and directories so you can easily arraneg, organize your files.
- Domain Management. Easily allows you to create a hosting account for your customers.
Below requirements before we can setup cPanel should be considered.
- A centos 7 64bit server from vpsserver.com.
- Root access to the vps machine.
- An ssh client like putty or bitvise.
Once all the above requirements are ready we can now install cPanel.
cPanel provides a custom installation script to install and configure the whole cPanel system. We will just have to download the file and run it.
The command is below.
cd /home && curl -o latest -L http://httpupdate.cpanel.net/latest && sh latest
The command above changes the current working directory to /home, downloads the latest installation script from cPanel and execute the script.
When all is installed you will see a completion message at the bottom just like below.
2016-07-23 17:33:18 938 ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server. 2016-07-23 17:33:18 938 ( INFO): 2016-07-23 17:33:18 938 ( INFO): 1. Open your preferred browser 2016-07-23 17:33:18 938 ( INFO): 2016-07-23 17:33:18 938 ( INFO): 2. Type https://184.108.40.206:2087 in the address bar 2016-07-23 17:33:18 938 ( INFO): 2016-07-23 17:33:18 938 ( INFO): 3. Enter the word root in the Username text box 2016-07-23 17:33:18 938 ( INFO): 2016-07-23 17:33:18 938 ( INFO): 4. Enter your root password in the Password text box 2016-07-23 17:33:18 938 ( INFO): 2016-07-23 17:33:18 938 ( INFO): 5. Click the Login button 2016-07-23 17:33:18 938 ( INFO): 2016-07-23 17:33:18 938 ( INFO): Visit https://go.cpanel.net/whminit for more information about first-time configuration of your server. 2016-07-23 17:33:18 938 ( INFO): 2016-07-23 17:33:18 938 ( INFO): Visit http://support.cpanel.net or https://go.cpanel.net/whmfaq for additional support 2016-07-23 17:33:18 938 ( INFO): 2016-07-23 17:33:18 938 ( INFO): Thank you for installing cPanel & WHM 11.56!
Thats it! WHM/cPanel is installed and our next step will be to configure WHM for your use.
Setting up WHM/cPanel
Go to your browser and type the ip address of your server followed by ':2086' like http://220.127.116.11:2086. After that, login using root and your password.
Once you are inside you will be greeted with an initial setup wizard where the first page will show you the end-user license agreement.
Click 'I Agree/Go to Step 2'.
On the next page fill up your email address, servers hostname and resolvers. You can ignore the other fields since those are not required but you cannot leave the fields mentioned above as empty since they are required.
When you are finish scroll down the page and click 'Save & Go to Step 3'.
On the third page is the ip address setup console, this is where you can add other ip addresses if you have more. If you only have one ip address then you click on 'Go to Step 4'.
The next step is nameserver setup. If you want to run your own nameserver from within whm you can enable this settings. You can select from Bind, MyDNS or NSD. Remember that if you are planning on hosting your own namesevrers, you will have to provide an additional of 2 more ip address, one for each nameserver.
To add your own nameserver, select one from Bind, MyDNS or NSD, enter the nameserver hostname in the Nameserver 1 and Nameserver 2 fields and add an ip address entry for each nameserver hostname.
If you disable nameserver in WHM please remember that you have to provide your external nameservers in the Nameserver 1 & Nameserver 2 fields.
The services page will allow you to configure your FTP, Mail and CPHulk Protection settings. You will be able to select the FTP server of your choice from ProFTPD, Pure-FTPD or disabled FTP altogether.
You will also have the option to select the mail server from Dovecot or disabled ad well as enabling CPHulk Brute Force Protection.
If your configuration is finished just click on 'Save & Go to Step 6'.
The last part of the setup page will ask you if you want to use file system quotas or do not use file system quotas. For this option we will use file system quotas, once you are done click on 'Finish Setup Wizard'.
Thats all! Now you can upload your web files, add third party add-ons or further configure WHM/cPanel to your needs.