Thursday, April 30, 2009

Install cPanel


    In order to run the cPanel software you must first be running a supported OS like RedHat or CentOS.
cPanel lists their supported operating systems on their website at http://www.cpanel.net.   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. 

IMPORTANT: 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!

cPanel has made the installation process a simple one and only takes a few commands to get the install going.  Below are the steps:

1.  Log into your server as root via the console or SSH.


2.  Ensure your resolvers are working by trying to resolve cpanel.net (cmd: nslookup cpanel.net).
2.1.   If nslookup does not work, giving a 'command not found' error, you can use yum to install the necessary packages (cmd: yum install bind-utils.i386).
2.2.   If you get an error about not being able to resolve the host, you need to edit your /etc/resolv.conf and add proper resolvers ( eg; 8.8.8.8 )
3.  Change directory into your /home (cmd: cd /home).

4.  Download cPanel's installer (cmd: wget -N http://httpupdate.cpanel.net/latest ).

4.1.   If you get a 'command not found' error, you need to install wget. (cmd: yum install -y wget).
5.  Now run the installer using sh or bash (cmd: sh latest).
5.1.   If you get another 'command not found' error, you need to install Perl. (cmd: yum install perl).
The installer is now running and may take a hour to two depending on your servers hardware, OS, connection speed, etc.
Once the installation is complete it's not time to log into the WebHostManager (WHM) and go through the wizard. Point your browser to http://your_ip_here/whm or http://your_ip_here:2086/ . You will be prompted for a user/pass, enter root as the user and enter your root password in the password field.  The wizard will now launch and ask you a few questions.  

Once complete your system is ready to use! Good Luck ;)