• Sales: 1-800-961-2888
  • Support: 1-800-961-4454

CentOS/REL - Installing cPanel & WHM 11.24


This tutorial will walk you through installing cPanel and WHM (WebHost Manager) 11.24 on your CentOS or Red Hat Enterprise Linux Cloud Server. This tutorial is only one example, as there are multiple ways that you can configure cPanel during.

NOTE: cPanel is a 3rd party software provider.  Rackspace Cloud does not distribute or support cPanel, WHM, or any related software.  You can read more about purchasing a licensed version of cPanel from their website.

Contents

Prerequisites

Before you begin your cPanel installation you need to make sure you have met the following conditions, or the installation will fail:

  • Your IP must be authorized to install cPanel. This happens when you purchase a cPanel license.
  • The hostname on your server must be a Fully Qualified Host Name (FQHN). For example:  web.domain.com

    You can modify this by changing the 'hostname=' line in /etc/sysconfig/network and then restarting your server. For more information on setting the hostname in CentOS you can check out this article.

  • The ports you will use to access cPanel need to be opened in the server firewall.  You can do this through the iptables command.  To open the default ports, run the commands:
    sudo iptables -I INPUT -p tcp --dport 2086 -m state --state NEW,ESTABLISHED -j ACCEPT
    sudo iptables -I INPUT -p tcp --dport 2087 -m state --state NEW,ESTABLISHED -j ACCEPT
    sudo service iptables save
    

Some other items to mention before installing:

  • Please be sure that you followed the setup instructions for CentOS before starting this tutorial: CentOS - Setup
  • It is expected that you are installing this on a CLEAN server. You should not have any other applications installed on your server or it could cause the cPanel installation to fail. If you have installed other applications please use the Rebuild feature in the Control Panel to re-image your server from the base CentOS image provided by Rackspace Cloud.
  • This setup will take several hours to complete. On a 256MB Cloud Server, it will take roughly six hours to complete. Servers with more memory will take less time.

Installing Perl

First we need to install Perl so the cPanel installation can run.  We will install the version of Perl that is currently available on the YUM software repositories by using the following command.   It is assumed that you are running this command as a non-root user with sudo permissions.

This command downloads and installs Perl from the YUM repository:

# cd ~# sudo yum install perl

Downloading cPanel Installation Files

Now you need to download the cPanel installation script. This small file will connect to the cPanel site and download the latest version of their software.

Use the following command to download the script:

wget http://layer1.cpanel.net/latest

cPanel Installation

Now we are ready to install cPanel. Please be prepared to leave your SSH connection open for several hours without interruption. If your connection is interrupted it could cause the installation to fail!  This may require that you change the Sleep or Powersave settings on your local machine.

Use this command to install cPanel:

# sudo sh latest

After the install is completed you should see:

cPanel Layer 2 Install Complete

Logging In

Now we are ready to login for the first time.

  1. Point your web browser to port 2086 on your Cloud Server by opening the IP address directly in a browser address bar:
    http://12.34.56.78:2086/
    

    Replace 12.34.56.78 with your server's IP address.

  2. If your site is SSL enabled and you would like to connect securely use the following URL instead:
    https://12.34.56.78:2087/
    

    This will bring up a login window. Type in root for the user name and enter your root password and click OK.

Step 1:  Initial Setup - End User License

If you agree to the End User License Agreement, click 'I agree/ Go to Step 2'

Step 2:  Initial Setup – Contact Information

  1. Under Contact Information, go ahead and fill in your e-mail address and any other contact information you feel is necessary. An e-mail address is required.
  2. Under Hostname, please verify that your hostname is listed correctly. It should be a fully qualified domain name (something.domain.com).
  3. Click the Save & Go to Step 3 button to continue.

Step 3:  Initial Setup – Network Interfaces

On this screen we will not make any changes. Simply click Skip This Step and Use Default Settings at the top.

Step 4:  Initial Setup – Nameserver Configuration

Now you need to make a couple of decisions. The first decision to make is todetermine if you will run your own nameservers or not.

If you plan on running your own nameservers, please select the type of server you'd like to run. We recommend running BIND as it is most commonly used.

Next, you need to list your nameservers.  If you are choosing to run your own nameservers, then you will need to list your server's Fully Qualified Host Name (FQHN) here.

If you are not going to run a nameserver select Disabled.

If you are choosing to use a third-party source for DNS, then you will need to enter their information. This is shown to customers when they are setting up domains in cPanel.

If you are running your own nameserver you might want to create a DNS record in your Cloud Server Control Panel for your server. A suggested name would be 'ns' or 'ns1'. After you have completed these steps, click 'Save & Go to Step 5'.

Step 5:  Initial Setup - FTP/Mail Configuration

Next we need to setup the FTP services. We recommend using the default option (Pure-FTPD).

You also need to configure mail services. Use the default option for this selection as well.

Click 'Save & Go to Step 6' to continue.

Step 6:  Initial Setup Quotas

Leave the default option selected (Use file system quotas) for quotas.

Click 'Finish Setup Wizard' in order to finish the installation.

Congratulations!  Your cPanel Installation is now complete!



© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER

14 Comments

You should say that it might take hours to install this. Along with "After the install is completed you should see:" you should indicate the long time to install. I installed mysql, php, apache, and those took less than 30 seconds each. so far cpanel is taking over 2 hours!

Ouch. I'll take a look, and update the article accordingly. An install that lengthy should definitely get a warning label if it's the norm. Thanks for letting us know about it.

Why dont you guys provide a CentOS + cPanel + LAMP image thru your control panel or atleast thru rightscale...? It would be easier for folks like us who're not linux folks can use your cloud easier.

I'm having an a/c with you, using some cloudfiles, but couldnt cloudserver due to this restriction.

I agree having an image would be nice

Start > take a bigger server with more memory> Server receives the speed

2. Installation time can take up to ~ 73 minutes> to the server with 512 MB of memory

3. Follow the instructions to install already written

4. Add all ports !

4.2. http://www.cpanel.net/2007/06/getting-the-most-out-of-your-systems-firewall.html

> At the end > sudo / sbin / iptables-F

> Good luck

Nice tutorial but you forgot to add this - cd /home before doing wget http://layer1.cpanel.net/latest .. The user has to download the file to the home folder before running sh latest..

Regards

Thanks Fiki. We usually try to leave the initial location open when running an install script, but if the home directory is a required starting point we'll update the article accordingly.

Is there a release where fedora is supported?

It doesn't look like Fedora is supported by cPanel anymore, I'm afraid. You might find some advice on the Internet on working around the limitation, but since it isn't supported in their official system requirements, we'll remove references to Fedora from this article. Sorry for the confusion.

Can you explain this even further - "If you are running your own nameserver you might want to create a DNS record in your Cloud Server Control Panel for your server. A suggested name would be 'ns' or 'ns1'."

I believe that recommendation is primarily to help you keep track of your nameserver, but it would be a good idea to create a PTR record (reverse DNS) for each name server being used as a DNS server. You can find that option under the server details screen.

In general I wouldn't recommend running your own nameserver. They can be a bit of a headache to manage, and the DNS management in our newer control panel (mycloud.rackspace.com) is capable enough for most people's needs.

I have installed cpanel and WHM but it says "This copy is a trial version and will expire at the end of the trial term. You will need to upgrade to a paid copy to continue using the software after that term" How can I upgrade this?
Why rackspace does not provide licensed version?

As noted in the article, we don't provide nor support cPanel. We provide these instructions to help customers who are installing it on their Cloud Servers, but they would still be responsible for licensing cPanel themselves.

thank s for such detailed tips, it help me alot

Add new comment