Log into Your Server Using Windows
Start the PuTTY application, and you will be presented with a session configuration window:

There are a wide variety of settings that you can change, but this book cannot go into great detail about this or any other SSH client. The only critical information you will need to enter is the information on the Session screen. Type your server's main IP address (which you'll have from your host NOC's welcome letter). Leave the protocol set to SSH and the port set to 22, and click Open at the bottom of the window. You should shortly be prompted for your username which is root and the user's password. Enter it, and you will be at the root shell (similar to a DOS command line). Now you can skip down to the Are cPanel and WHM Installed Already section.
Log into Your Server Using Mac OS X or Linux
You should be at a command line at this point (from now on referred to as a shell). Type the following to log into your server:
ssh -lroot IPADDRESS
ssh is the command itself that tells your computer to try connecting to the specified IP address via SSH. -lroot is a combination of the option -l which tells SSH what user to try logging into and the actual name of that user (root in this case). No space is necessary between the option -l and the username. This is followed by a space and the IP address of your server. The SSH command always assumes you want to use the standard SSH port number 22 to connect unless you add -pPORT# to the command. Here's an example: ssh -lroot 111.111.111.111 -p6731
This example will try to connect to the server at IP-111.111.111.111 as the user root using port 6731 (instead of port 22).
Since this is the first time you've connected to this server, you will probably be prompted if you actually want to connect to it, or not before you actually get to the login prompt. Here's an example from my Mac (your own display may differ):
Last login: Mon Apr 24 18:49:02 on ttyp2
Welcome to Darwin!
Computer:~ aric$ ssh -lroot 111.111.111.111
reverse mapping checking getaddrinfo for 111.111.111.111.reverse.
layeredtech.com failed - POSSIBLE BREAKIN ATTEMPT!
The authenticity of host ‘111.111.111.111 (111.111.111.111)' can't be established.
RSA key fingerprint is d3:9b:46:6e:1d:ba:60:50:2c:85:26:bb:24:c1:81:a4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘111.111.111.111' (RSA) to the list of known hosts.
root@111.111.111.111's password:
Last login: Mon Apr 24 18:47:04 2006 from support.ltsvnoc.layeredtech.com [root@82 ~]#
After you attempt to log in for the first time, your computer may warn you that reverse mapping checking failed for your new server. If so, ignore it for now, it is something we can get the host to fix later. You may also be prompted if you want to continue connecting to this machine. If so, type yes. This is just your computer's way of letting you know that it has never connected to this machine before and so doesn't recognize it.
After the first connection attempt, the RSA key for the server will be saved on your computer. Every time you connect to this machine from now on, the server's key will be compared against the saved local key. If they match, you'll be able to continue connecting. If not, you'll probably get a warning about mismatched keys and may have to delete the local key if you want to continue connecting. However, if you get such a warning, you should make sure that you're connecting to the correct server and not getting redirected to some other server.
You will be prompted to enter the password for the user you specified in the SSH command (root). Type in the root password you were given by your host. Linux does not display what you are typing as a form of security, so just type carefully and press Enter/Return when you've finished. If you typed it properly, you should now see a line letting you know what time and date someone last logged into this server. It should also display the IP address (or host name) of the computer that connected to your server (be sure you recognize the login time/location to be sure someone else isn't accessing your server other than your data center or yourself). You will then be at the server's root shell command prompt (which may end with a # or $, or even some other character).
Are cPanel and WHM Installed Already?
To figure out if cPanel and WHM have been installed, you can check this in several different ways (assuming your host hasn't already explicitly told you if it is installed or not). One way is to check and see if cPanel is installed and functioning via the root shell. You can try to determine it by looking for unique files:
ls /scripts/upcp
If you can see the upcp script in that location, then cPanel and WHM have been installed already. If that script doesn't exist, then you will probably have to install cPanel and WHM yourself.
Alternately, you can try connecting to your main server IP address via your web browser: http://111.111.111.111/

If you see a screen similar to the previous one, cPanel and WHM have already been installed. If not, then you may have more work ahead. Just to be absolutely sure, try also connecting to your server via port 2087 (secure) in your browser: https://111.111.111.111:2087/ or https://111.111.111.111/securewhm
You could also connect via port 2086 (nonsecure) in your browser: http://111.111.111.111:2086/ or http://111.111.111.111/whm
If you get prompted to enter your username and password, then WHM and cPanel are installed. For now though, don't bother logging in even if WHM is active (unless you plan to skip ahead in this book).
How to Install WHM and cPanel
If you are certain WHM and cPanel haven't been installed on your server yet, and that you do have an active license for it, you will need to install it. Thankfully, cPanel Inc. has made the process fairly easy on supported hardware and operating systems (see Chapter 1 for more on supported hardware and OSes).
First, make sure the server itself is as pristine as possible. If you've had another control panel or other similar software installed, you may have problems installing cPanel. If you've just gotten your server details from your host NOC, then it's probably ready for cPanel right now.
To install WHM and cPanel, you will need to log into your server as root first. Once you are at the shell prompt, type the following to begin the installation process:
mkdir /home/cpins
cd /home/cpins
wget http://layer1.cpanel.net/latest
sh latest
Note that this process is the same for all supported operating systems. The installer will figure out what hardware and software you have and install the appropriate files.
This will create a directory to hold the installation files and then fetch the latest cPanel installer script and run it. The script itself will take care of everything else.

As you can see, the script will warn you about not trying to run this installer if cPanel is already installed, as it will wipe out your existing configuration files. Press Ctrl+C if you want to quit the installer before the installation begins. After it starts, you should not interrupt it for any reason or you may end up with an unstable system.
The actual installation process, once begun, can take quite a while, so you may want to go get some coffee or tea while you're waiting. You won't be required to enter any information at all during the installation, so you might as well relax. The time it takes for the installation to complete depends on how fast your server is. Low-end hardware like a Celeron or Sempron will obviously take longer than a dual Xeon or dual Opteron server. The listed time to finish the install (10 to 70 minutes) is fairly reasonable.
During the installation process, the install script downloads and installs critical files and services needed to run both WHM and cPanel. When the process finishes, hopefully without any errors, you will be returned to the root shell prompt.
If you get any errors during the installation, or if the installation fails, contact your host or cPanel license provider for assistance.
Accessing WHM and Finishing the Installation Process
Even if your host has installed WHM and cPanel for you, they may not have finished the process for you. You need to access WHM and check before doing anything else.
Accessing WHM may be familiar to you if you had a reseller account with another web host before obtaining your own server. If you were a reseller, you accessed WHM to manage your client's cPanel accounts. Even so, you'll be shocked at the wealth of features in WHM that you only have access to when logged in as the user root.
To access WHM securely, access the main IP address of your server like this in your web browser: https://111.111.111.111:2087/ or https://111.111.111.111/ securewhm.
You will probably get a warning about the server SSL certificate. If so, accept the certificate and continue. You will then be prompted to log in. To access WHM as the server administrator, you log in as the user root and use the same root password you used to access your server via SSH earlier.
If you have problems accessing your server using the secure method above, you can access it without SSL/TLS like this: http://111.111.111.111/whm or http ://111.111.111.111:2086/. This is not recommended unless you simply cannot get into WHM securely because it is possible for hackers to intercept insecure communications between your computer and your server. The username and password are for the same as the secure login method: the user is root and the password is your server's root password.
Finishing Installation
Once you log in, you will either be greeted by the main WHM screen with lots of text in the sidebar and icons in the center, or by a screen that is mostly empty, except for some writing in the sidebar on the left:
Welcome to Web Host Manager®!
It appears this is your first time using Web Host Manager®. This wizard
will guide you through setting up your server.
If you see the full WHM screen, then your installation is complete, and you can skip to the next section.
WHM Setup: The License
If you see the Welcome text mentioned earlier, click the Next button to be shown the cPanel license agreement. You should read this agreement, and then you must click the I Agree button at the bottom of the agreement if you want to continue using WHM and cPanel.
WHM Setup: Basic Information
The screen will change once you accept the license agreement, and you will be asked to fill out some information. Note that you won't need to actually make any changes to this section right now if you don't want to, but you will need to revisit this screen by clicking Basic cPanel/WHM Setup at the top of the WHM sidebar once you've finished the installation process.
Basic Information: Contact Details
These details will be used by the server to contact users in case of downtime.
Depending on which version of WHM and cPanel you have installed as well as what operating system/hardware you are using, the options in this basic setup section may be slightly different or rearranged.

The Server Contact E-mail Address will be the address e-mail is sent to, when there are problems with the server (the server is overloaded, services fail and need to be restarted, etc.). Exactly what kinds of warnings you will get via e-mail depend on what you set in the Contact Manager (discussed later in Chapter 3). Keep in mind that this e-mail address will automatically appear in every account's DNS zone on this server (see Chapter 7 for information about DNS zones). Therefore, make sure this e-mail address is a real e-mail address that you check regularly, but one that you don't mind the public having.
The Server Contact Pager Address is an e-mail address where the server can contact you if there is a problem. Note, the server cannot handle SMS messages, so your provider must provide a standard e-mail gateway for your pager or cell phone. What you are contacted about this way depends on the settings in the Contact Manager.
Server Contact AIM Address is the screen name or AOL Instant Messenger (AIM) username where you can be contacted if there is a problem with your server. Again, contact is governed by the Contact Manager settings.
AIM Username is the AIM username the server itself should log into in order to contact you via that messaging service. You may need to set up a special AIM username for the server. You can do this by clicking the word here in the item description.
AIM Password is the password of the AIM account you want the server to log into when there is a problem in order to AIM you. This password is stored in plaintext on this screen, so don't use a password you use for any other service and especially make sure it is not the server root password.
The Server Contact ICQ item is the ICQ number (another instant messaging service also owned by AOL) you can be reached at in case of an emergency with the server. What you get contacted about depends on the settings in the Contact Manager.
ICQ ID allows you to set the ICQ number the server should log into in order to send you a message via the ICQ instant messaging service.
ICQ Password is the password for the ICQ ID number the server will use to contact you. Again, this password is stored in plaintext on this screen, so be careful with what password you use.
Installing cPanel and WHM in your Server # 3
adminInstalling cPanel and WHM in your Server # 1
admin You should now have access to your dedicated or VPS server. Depending on the policies of the company you obtain your server from, it may already have cPanel and WHM ... Full story















CyberNews


