Installing WHM/cPanel
This is a tutorial you can use to help you install WHM/cPanel on your server.cPanel is not free and you will have to purchase a license from the cPanel site (http://www.cpanel.net/), however, they do offer a trial license, to allow you to evaluate the product which will last you 15 days. Before continuing this tutorial, head over to https://www2.cpanel.net/store/ and get a license. This tutorial applies to Cent OS servers with the Rackspace Cloud Servers as the hosting provider, it may differ for other setups.
Right here we go:
- Login to your server via command line and ensure you are in the correct directory
- cd ~
- Lets get a few things out of the way before the installation. It takes about an hour so we may as well do this before rather than after otherwise I’d probably forget. Create a backups folder for cPanel to backup to:
- mkdir /backups
- Install a few useful apps that will make the managing of your server a little easier
- yum -y install traceroute jwhois tcpdump mtr bind-utils perl mlocate
- updated #this updates locates database and allows you to search for files on your machine easily
- Open up the ports we will need to be using once channel is installed
- /sbin/iptables -I INPUT 1 -p tcp –dport 80 -j ACCEPT #web
- /sbin/iptables -I INPUT 1 -p tcp –dport 3306 -j ACCEPT #mysql
- /sbin/iptables -I INPUT 1 -p tcp –dport 2086 -j ACCEPT #web interface
- /sbin/iptables -I INPUT 1 -p tcp –dport 2083 -j ACCEPT #iphone app
- /sbin/iptables -I INPUT 1 -p tcp –dport 2082 -j ACCEPT # domain handling
- /sbin/iptables -I INPUT 1 -p tcp –dport 2095 -j ACCEPT #webmail through cpanel
- /sbin/service iptables save
- Go to the tmp directory and download cPanels installation file
- cd /tmp
- wget http://layer1.cpanel.net/latest
- Run the installation file, you will get a warning before the install begins so you have a moment to cancel the install if you need to
- sh latest
- Once this is done you should be able to login providing you opened the the port. Go to a browser and go to your ip via port 2087
- http://youiphere:2087
- Your user and password should be that of the sudo or root user on your server
- You will now be presented with a wizard
- Step 1: Accept/Agree to the terms and conditions
- Step 2: Set up your contact information
- Step 3: Use default settings
- Step 4: Here you should input your DNS server setting. If you are using Rackspace these are written below
- 69.20.95.4=dns1.stabletransit.com
- 65.61.188.4=dns2.stabletransit.com
- Step 5: Pure-FTPD is the recommended FTP engine and Courier is the recommended mail service, however, some mirrors are missing and it may take a while to resolve, be patient.
- Step 6: Setup your file system quota, I recommend you use the default but if you have just cause limit this as you wish.
- Done, you should be in and able to see the control panel!
I hope this was helpful to all, and I hope it worked! I shall upload a shell file that should do most of the heavy lifting in the near future and update the article. If your having problems or would like to leave feedback please use the comments section below.