How do I install cPanel?

1. Log in to your fresh, clean server install via SSH as root.

2. Now, let’s install screen in case we get disconnected (I’ll be posting more about screen in a later article, for now, just trust me):
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 need to set the hostname for cPanel to use.  This is usually something like:, you’ll want it to have 3 sections (server.domain.ext):
a. nano /etc/sysconfig/network
b. Find the section that is labeled hostname and edit the entry to contain your hostname, or add it if it does not exist: HOSTNAME=”
c. save and exit the file

6. Now, just to be sure, let’s also set the hostname for this session by typing (all on one line):

7. Now, let’s run screen so that we can reconnect if needed.  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” 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
cd /home

10. And now, let’s get the cPanel install script.  This is a really fast download:
wget -N

11. 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 (my test run on a 512MB/2-Ghz VPS took about 90 minutes and about 75 minutes on a 1024MB/shared-8-core VPS):
sh latest

12. 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. NOTE: You might see some scary messages fly by on screen if you sit around and watch the install.  Things like “could not find…” or “…is disabled…” or “no process killed”.  Unless the installation fails, you can safely ignore these messages.  Most of them are not generated by the install per se, but by programs that the install is running; this has never caused a problem for me.  Also, there are a few times when it will appear like NOTHING is happening.  Do not panic and for godssake, do not interrupt the installer!  This is normal and expected.  Remember, even on a very fast machine, cPanel can take over an hour to install!

13.  When the install is done, go to your web browser and browse to (insert your server’s ip address):

14.  Log in with user name root and with your normal root password (the one that you would normally log in to SSH with).

15.  A short web-based installation walk-through script will follow (you’ll confirm your host’s name, confirm your IP addresses, add DNS entries for the host, choose your DNS resolver, etc).  Choose your answers carefully (but you can always change them later).  cPanel will then finish installation and you’ll be ready to tweak your cPanel server to your heart’s content! You’ll probably want to install a good firewall product (like csf), and I’ll actually be covering this awesome, free firewall in an upcoming post.

  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What is a VPS and why do I need one?

A Virtual Private Server or VPS is exactly what it says on the tin. It is a server that is...

What hosting control panel do you offer?

We use SolusVM to manage our VPS nodes.  

Can you provide a Dedicated IP?

Each VPS comes with 1 IPv4 dedicated IPs. If you need additional IPv4 IPs, they are $2.00/month...

How do I enable TUN/TAP on OpenVZ VPS?

In order to activate TUN/TAP on your OpenVZ VPS log into VPS Control Panel, click the "Manage"...

What happens when my VPS reaches its bandwidth limit?

If your VPS exceeds its bandwidth limit, our system will automatically suspend the service. You...

Powered by WHMCompleteSolution