cPanel is a web based control panel tool which will help you manage your web hosting account through a web interface instead of a console. With cPanel you are able to accomplish your tasks faster and even non-professionals can easily set their websites via cPanel.
In order to run the cPanel software you must first be running a supported OS. cPanel lists their supported operating systems on their website at http://www.cpanel.net. Although there are many to choose from not every OS listed works flawlessly. If you’re looking to have the least amount of problems and ease of administration we highly recommend you choose CentOS as your distro. CentOS is a recompile of RedHat Enterprise, and our research has shown that CentOS is the most widely used and easily supported distro when running cPanel. Note: cPanel currently does not support distributions other than CentOS, RHEL, & FreeBSD. Please be aware of this when installing your OS
cPanel also recommends that the server it is being installed on is a clean and fresh install. This means that if you previously had done any configuring or ran another control panel software that they recommend you reinstall the server.
[notice type=”warning” title=”Attention” tag=”h5″]If the server you plan to install cPanel on is a live production server, STOP. cPanel’s installer may overwrite your previous configurations and cause downtime for you or your customers![/notice]
1. Log in to your fresh, clean server install via SSH as root.
2. Now, let’s install screen in case we get disconnected:
yum -y install screen
3. Now, let’s install rdate to avoid a nasty little error later on some VPS servers (this won’t actually fix the underlying problem, but it will stop the error from showing up):
yum -y install rdate
4. We’ll also need Perl to install cPanel and nano to edit some files, so let’s make sure we have them:
yum -y install perl nano
5. We disabling the SELinux security features
6. We also Deactivate the default firewall
chkconfig iptables off service iptables stop
7. Now, let’s run screen so that we can reconnect if needed.
screen -S cpanel_install
If your SSH session should get disconnected while you are installing cPanel (cPanel takes a LONG time to install), you can just SSH back in and type
screen -r cpanel_install
and you’ll be magically reconnected to your installation session.
8. Now, run this command. You may just get a bunch of errors; that’s fine and expected. This is just making sure your server is ready for a clean cPanel install (this should all be on one line):
yum -y groupremove "FTP Server" "KDE (K Desktop Environment)" "Mail Sever" "Mono" "Web Server" "X Window System" "GNOME Desktop Environment"
9. Let’s change to our home directory
10.Now we update the packages installed in the server
yum -y update
11. And now, let’s get the cPanel install script. This is a really fast download:
wget -N http://httpupdate.cpanel.net/latest
12. Now comes the long part. After you give this next command, sit back, have a cup of coffee, go do a crossword, do your laundry, whatever. cPanel will begin to install and this can take 60-90 minutes on even a decent VPS:
13. REALLY – GO DO SOMETHING ELSE. Trust me, this will take a while…if everything is set up cleanly and correctly, cPanel will begin filling the screen rapidly with commands and gobbledygook. This is good. This is normal. Now go away for a while, this will take a long time.
Once the installation is complete it’s now time to log into the WebHostManager (WHM) and go through the wizard. Point your browser to https://your_ip_here/whm or https://your_ip_here:2087/. Accept the security warning (this is because the certificate is self-signed). You will then be prompted for a user/pass, enter root as the user and enter your root password in the password field.
Step 1: License Agreement
Nothing complicated here, simply accept the licensing agreement and move on to step 2.
Step 2: Setup Networking
- Under the Contact Information heading enter the email address through which you will be contacted if your server has a problem in the Server Contact Email Address field.
- If you would like to be contacted via text messages, enter a phone number into the Server Contact SMS Address field.
- If you would like to be contacted via AIM, click the Server Contact AIM Name checkbox.
- If you would like to be contacted via ICQ, click the Server Contact ICQ Number checkbox.
- Under the Hostname heading enter your server’s hostname into the This Server’s Hostname field.
Remember: The hostname, in this case, must be a fully qualified domain name (FQDN). FQDNs are domain names that specify the exact location from the top level user domain to the root domain, when read from right to left. This hostname will require you to use 2 dots (.’s), for example: server.example.com.
- Under the Resolvers heading enter a primary resolver IP address into the Primary Resolver field. Enter a secondary resolver IP address into the Secondary Resolver field.
- Under the Main Network/Ethernet Device heading eth0 will generally be selected. This is usually what you will want to leave as default unless you know what you’re doing.
Step 3: Setup IP Addresses
If you only have 1 IP for your server, you may skip this step. cPanel will already have picked it up and assigned it as the default.
- Enter the new IP address(es) into the IP Address(es) to add field. You may use CIDR notation to add multiple IP addresses simultaneously. Refer to the Quick CIDR Reference Table at the bottom right of the screen.
- Remember: When using CIDR notation, enter the appropriate subnet mask for the range of IP addressess.
- Click Add Ip(s).
Step 4: Nameservers
This part of the Initial Setup feature allows you to configure nameservers. Nameservers are responsible for spreading your server’s DNS information throughout the Internet. You will need to use nameservers in order for visitors to access your website(s). You have two options for a server on our network. You may use your own nameservers as detailed below, or you can use ours. If you opt to use ours, you do not need to go through this configuration, however you will need to notify us whenever you have a DNS change to be made (including adding your domain initially). To configure your own nameserver:
- Select the nameserver software you would like to use from the list, or disable local nameservers, by clicking the corresponding button.
- Important: Read through the advantages, disadvantages, and notes before making a decision. The BIND nameserver software will be adequate for most servers.
- Next, you will need to choose nameserver domains. You will need to add these at your domain registrar before they will work. To add nameserver domains:
- Enter the first nameserver into the Nameserver 1 field. Most nameservers follow the naming convention ns1.example.com and ns2.example.com, where ns stands for nameserver and example.com is meant to stand for your domain name.
- Enter the second nameserver into the Nameserver 2 field.
- If possible, you should add nameserver domains to the Nameserver 3 and Nameserver 4 fields. Having additional nameservers configured for your server will improve uptime if anything should happen to the first 2 nameservers.
- The last step in configuring your nameservers is to add A entries for your nameserver domains. A entries are records on your server that couple the domain names of your names servers to their corresponding IP addresses. To add A entries for your nameserver domains:
- Click the Add “A Entries” for all Nameservers checkbox.
- Enter the IP addresses for each of your nameservers listed below.
- Click Add “A Entries” for Hostname if you would like to add an A entry for your server’s hostname.
- If you clicked the Add “A Entries” for Hostname checkbox, enter the IP address for your server.
Step 5: Services
This area of the initial setup feature allows you to configure what services you and your clients will be able to use on the server.
- To begin, select which, if any, FTP server software you would like to use.
- The next step is to select a mail server. Leave the Convert Mailbox Format option checked if you opted to enable a mail server.
- The final step in configuring the services for use on your server is to select whether or not you would like to use the cPHulk software. cPHulk is a small program that will run in the background of your server to prevent people from using a brute force attack to compromise your machine. If you want to enable it:
- Click the Enable cPHulk checkbox.
- Use the checkboxes to determine:
- Whether to extend lockout time for each additional failure past the limit.
- Whether you will receive notifications when a brute force attack is detected.
- You may access cPHulk’s advanced settings by clicking the Configure Advanced Settings checkbox. Using the advanced settings you can:
- Specify the number of minutes you would like to block the IP address of a potentially malicious user (in the IP Based Brute Force Protection Period in minutes field).
- Specify the number of minutes to lock an account (in the Brute Force Protection in minutes field).
- Specify the maximum number of failed authentication attempts allowed by an account (in the Maximum Failures By Account field).
- Specify the maximum number of failed authentication attempts allowed by a particular IP address (in the Maximum Failures Per IP field).
- Specify the number of failed authentication attempts before an IP is blocked for 2 weeks (in the Maximum Fails Per IP before IP is blocked for two week period field).
Step 6: Set Up Quotas
This is the final stage of the Initial Setup process. You will need to select whether you would like to track disk usage on your server. This is generally a good idea if you plan to lease server space to individual users. However, if you do not plan to host individual accounts on your server (i.e. the server will only be for your own use), there may be no need to enable quotas.
Once you have finished, click the Finish Setup Wizard button. You will then be taken to the WHM home page. Your system is ready to use!