December 11, 2008 4:46 pm GMT
WHM -Installation guide
by Gary IllyesI think writing this article is a bit pointless, because the vast majority of the datacenters you lease the server from will do this for you. But there are also datacenters which accepts your own, home built server and in this case you will have to face that there’s no one who wants to install you the server management software, in our case the WHM/cPanel combo.
This article is a modified version of one of the 4ugroup server manager’s tutorial. There are no screenshots because most of the things look differently on various OSes. So it would be pointless to show you something which looks totally different on your side.
First, let’s make sure you have the minimum requirements for WHM, and that you will not run into issues caused by 3rd party applications or incompatibilities.
The server specification can be low; cPanel/WHM will run even on a Pentium 1, not sure what will you do with a server like that but whatever. It would be cool if it would have 2 NIC (network interface controller) to have 2 networks available: a private and a public. The private network will be used to connect to the datacenter’s private network on which you can manage the server securely, and the public network will be used to connect to the Internet, it will be used, well, by the public.
You will also have to have an OS already installed. We recommend, again, CentOS for various reasons, but you can choose any other, supported Linux distro, or even FreeBSD. Make sure you have some debuggers and compilers installed. For example a C development tool is required, so is wget if you obtain the cPanel/WHM release from the cPanel Layer. If we’re at wget, do make sure that the uplink to the public network is not used by anything else and is stable. Now make sure the package management system is working properly. And these are the only tools you will need. Note, that you do not have to install Apache, PHP or anything else. They will be installed by cPanel/WHM.
Now should come some words about the partitions. Not in this case, because our experience shows that in 99% of the cases the operating system created partitions are good enough for cPanel/WHM. Worth to mention though, that the /tmp directory should be on a separate partition. This is a basic security measure, if somebody wants me to explain why is this a good idea, feel free to ask in the comments section.
So let’s move forward to networking and hostnames.
First, if the resolvers are working properly. To test it, type the following in the command prompt: dig google.com@yourip , nonetheless to say that you have to replace yourip with an IP from resolv.conf. If it resolves correctly, you’re almost ready to install cPanel/WHM. Before you proceed, make sure there’s no non-vital daemon or process running in the background. We’ve found that sometimes these rogue processes can poison the install, so if there’s running something which you think is unnecessary, just kill it. kill, is a Linux command which is used to end processes. The syntax is kill PROCESS_ID.
Now, think about a hostname you will assign to the server. For this, you will have to have under your management a domain name. Common practice is to choose the nickname for the server from the Greek mythology. Many gives their server’s names like zeus.yourdomain.com or hera.yourdomain.com, but it can be absolutely anything, even britneyspears.yourdomain.com. Just make sure you choose a name which will never be used publicly; this hostname has to be unique.
OK, if you thought you have to do anything else before install, you were wrong; that was all.
If you didn’t yet, login via SSH to the server, or if you’re in the front of the server, just turn it on. In both cases login as root.
Type the following in your prompt:
cd /home
wget http://layer1.cpanel.net/latest
sh latest
Decryption: The first line switches to the home directory/partition, second line instructs the wget software to grab a copy of the latest cpanel from the specified URL, and the last line, install the latest cPanel/WHM. You’re 90% done with the install.
Now open up a web-browser. When you leased the server, you got an e-mail from the datacenter which contains amongst many other things, the primary IP of the server. Type that IP in the address bar of the browser followed by “:2087″. 2086 and 2087 are the default ports on which cPanel and (read this comment) WHM listens on. So your address bar should contain something like this: YO.U.R.IP:2087. In the popup window type root as username and the password associated to this super-user.
Accept everything and click OK on every possible thing until you arrive to a page where are dozens of input fields and questions. You will have to fill out the following fields (there are more, but they can remain empty or they’re already defaulted by WHM):
- Main Shared Virtual Host IP: this is NOT the primary IP of the server! You got an additional (and at least) 4 IPs with the server. Choose one from those and put it in this field.
- Server Contact E-Mail Address: your own e-mail address you check at least daily. Here will be sent the emails by the server, containing information you should be aware of
- Hostname: and here goes that hostname I told you to think about. Most likely you’ve chosen already one, if you didn’t, be creative. As I said, this will be a unique name.
- Type of Apache logs: combined or access. I’d recommend “access”, this way there will be no unnecessary, additional CPU load on the server. If there’s a problem with Apache, just switch to combined
- Nameservers: enter at least 2 nameservers in these fields. The more the better. Normally only the first is used and the rest is for backup. Note that these nameservers have to be registered with a registrar before they can work.
And this was all. WHM and cPanel is functional from now on.
To log in to your WHM, just type in your address bar:
YO.U.R.IP:2087
You will need the root password each time you log in, keep it in the nearby but in secure place. If arrives in the wrong hand, serious damages can be made in no time. Also, you should change this password every few weeks. If you change this password, please ensure you inform the datacenter about the password modification because if they can’t login, they can’t help if you need help from them.
















David Grega on Fri, 12th Dec 2008 7:41 pm
Just a clarification, port 2086 is used for plain-text HTTP connections to WHM (e.g. http://server:2086). However, port 2087 is used for encrypted HTTPS connections to WHM (https://server:2087). Using HTTPS is strongly recommended as this will ensure passwords are encrypted when sent to your server for logging in.
Depending on how you wish to set up your server, a common tactic to avoid having to use the root login every time you wish to use WHM is to create a dummy cPanel account for a domain you know you’ll never be hosting (e.g. example.com). Then you go to the Reseller Center in WHM and add root-level privileges to this user. You now have a user that has full access to WHM alleviating the need to login to WHM as root all the time. This user has no sudo privileges (unless you manually add them as a wheel user, of course), so this is generally viewed as a safe practice.
methode on Fri, 12th Dec 2008 7:53 pm
Hello David,
Nice to see you here.
On the subject and to be sincere, i never managed (yet) to login on port 2086 and am really not sure why. Anyway, I will update the entry with your info about the ports. thanks for the clarification. Appreciated.
For those who don’t know: David Grega is member of the cPanel team, and if am not mistaken his job is Sales support.