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
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: nameofserver.mydomain.com, 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=”vps1.example.com”
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
10. And now, let’s get the cPanel install script. This is a really fast download:
wget -N http://httpupdate.cpanel.net/latest
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):
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.