- Installation of cPanel/WHM
yum -y install perlNow 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.comYou can replace vps.mydomain.com with your hostname. You must own the domain of which your are setting up the hostname. Next, you will need to change your current directory to /home directory, run the following command to do this.
cd /homeDownload the installation script from cPanel website by executing the following command
curl -o latest -L https://securedownloads.cpanel.net/latestNow run the installation script by executing the following command
sh latestThis 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. 2016-06-11 08:42:33 938 ( INFO): On RHEL, CentOS, and CloudLinux systems, execute /scripts/configure_firewall_for_cpanel to accomplish this. 2016-06-11 08:42:33 938 ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server. 2016-06-11 08:42:33 938 ( INFO): 1. Open your preferred browser 2016-06-11 08:42:33 938 ( INFO): 2. Type https://22.214.171.124:2087 in the address bar 2016-06-11 08:42:33 938 ( INFO): 3. Enter the word root in the Username text box 2016-06-11 08:42:33 938 ( INFO): 4. Enter your root password in the Password text box 2016-06-11 08:42:33 938 ( INFO): 5. Click the Login button 2016-06-11 08:42:33 938 ( INFO): Visit https://go.cpanel.net/whminit for more information about first-time configuration of your server. 2016-06-11 08:42:33 938 ( INFO): Visit http://support.cpanel.net or https://go.cpanel.net/whmfaq for additional support 2016-06-11 08:42:33 938 ( INFO): Thank you for installing cPanel & WHM 11.56!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
Once you are logged in you will be taken to initial server setup. In Step 1 you will be shown the cPanel & WebHost Manager End User License Agreement, you can go through the agreement and click on I Agree/Go to Step 2 once you are ready.
In Step 2 you will be taken to the Setup Networking section. Provide your contact information, a valid email address which should not be hosted on the same server. This email will be used for sending critical information about server.
Scroll down to find hostname section, you can enter a new hostname for your server by replacing the old one which we have given during installation. If you don't want to change the hostname, you can leave the hostname field as it is. Enter DNS resolvers for your server. Resolvers will be used to fetch DNS entries of any website. If your service provider has DNS resolvers then cPanel will automatically detect and fill them for you, if not then you can use Google's public DNS resolvers which are 126.96.36.199 and 188.8.131.52 or OpenDNS's public DNS resolvers which are 184.108.40.206 and 220.127.116.11.
Next you can select your Main Network Device, an IP available on that device will be considered as the main IP address of your server.
Once done click on Save & Go to Step 3 button. In Step 3 you will see the section to Set Up IP Addresses. If you have more than one IP address assigned to your server and your interface, you can add them here. To add a new IP address just enter the IP address in IP Address(es) to Add field, if you have a pool of IP address you can also add multiple IP address using CIDR notations. Enter the Subnet Mask and choose the network interface. Click on Add IP(s) button to add the IP address. Down below you will see the list of current IP address available to your server. If you wish to use the default settings just click on Skip This Step and Use Default Settings button on the top. If you have added IP address then click on Go to Step 4 button. In Step 4 you will be taken to Nameserver configuration, you will have three options to choose from, you can compare the advantage and disadvantages of using different Name server applications. Recommended is that you choose BIND as it has most advantages. If you do not want to run a DNS server on your local machine you can disable the nameserver by choosing the disable option.
Next, choose the nameserver which your server will use. You may want it to be ns1.yourdomain.com or ns2.yourdomain.com. You will need to create hostnames in your domain control panel. Now add A Entries for your hostname by selecting the Add "A Entries" for Hostname checkbox.
Enter the IP address of your server if it is not prefilled. Finally click on Save & Go to Step 5 button to go to step 5.
In Step 5 You will see the configuration page for your services. In FTP configuration you can choose from two FTP applications, recommended is Pure-FTPD. Choose the disabled option if you want to disable the local FTP server. In mail configuration you can either choose Dovecot which is also recommended or you can choose to disable mail server by choosing disabled option.
Next you can configure cPHulk Brute Force Protection, select Enable cPHulk check box to enable cPHulk. Next you can select settings for cPHulk from many options. In Advanced setting of cPHulk you can choose duration to block a user from logging in if it encounters certain failures by Account and IP address.
You can also provide maximum failures before an IP address is blocked for a day. Finally click on Save & Go to Step 6 button.
In Step 6 you will be asked if you want to use file system quotas. It is recommended that you select Use file system quotas options. If you choose not to use file system quotas then you will not be able to track the disk space used by any user or website. Click Finish Setup Wizard to complete the initial setup wizard. You will now see some new features of cPanel in its feature showcase. In recommended features you will see cPanelID, which enables a user to login to cPanel with his cPanelID. This feature enables a user to login to multiple cPanels with single user id. You can enable this feature by choosing the enable option. To disable this, select No, thank you option.
Next, you will see cPHulk's username based protection feature which only blocks a certain user instead of blocking the IP address so that other user may login from same IP. There are more new features like PHP-FPM, ModSecurity, cPanel Reset Password and more. You can either choose to enable them or disable them by selecting No, thank you option.
Once you have chosen to enable or disable a feature. Click on Save Settings button to save the settings and go to WHM. You will now see the default home page of WHM
To see the user level interface of cPanel/WHM, you will need to create a user account first. Go to Home > Account Functions > Create a New Account in WHM. In the "Create a New Account Interface", enter the main domain of user, username will automatically get filled according to the domain, you can also use a different username if you want to. Enter a password for your user, you may also use password generator to generate a strong password. Enter a valid email for your user. You can choose a package from the dropdown, but as we have installed cPanel recently there will not be any package. If you do not select any package, cPanel will provide unlimited resources to this account.
Next, in the settings options, select the default theme. You can choose paper_lantern which is a modern and responsive. If you want the old non responsive theme you can select x3 or x3mail, choose the language in the locale setting. In the reseller setting you can make the account a reseller account. A reseller has ability to create more accounts under it. In DNS settings select the options to enable DKIM and SPF on the account. In the mail routing settings, unless required, leave the options as Local Mail Exchanger. Click on the create button to create the user account. cPanel will now run the script to create the user account and the output will be shown to you. Now you can go to https://your-server-ip:2083 to access cPanel, you will see the login prompt like shown below. Enter the username and password you have created recently and click on Login button.