Knowledge Base

Requirements

If you intend to host your own customers DNS, there's a bit of pre-setup work you should do. If you are not intending to host your customer's DNS, then skip ahead to the Setup section.

For this section we will assume you own mycompany.com , have named your VPS server1.mycompany.com and want to operate ns1.mycompany.com and ns2.mycompany.com on your VPS.

Nameserver IPs

Make sure you bought a second IP on Mammoth VPS to use as the secondary nameserver address. If you forgot this step, go into mPanel and use "Change Plan" to obtain a second IP.

Now that you have your two Mammoth VPS IPs, the primary will become ns1.mycompany.com and the secondary will be ns2.mycompany.com

Registering your nameservers

Now that you have the two IPs for ns1.mycompany.com and ns2.mycompany.com you need to create glue records. This process is different with every registrar but is often called "nameserver registration". cPanel have a guide for some of the more popular registrars.

Delegating mycompany.com

First decide if you want to host the mycompany.com DNS on your own VPS, or from within mPanel. Either is possible but the mPanel method is arguably simpler because you can set it all up prior to cPanel.

If you want to use mPanel, then go to your registrar's website and delegate to ns1.mammothvps.com.au + ns2.mammothvps.com.au ; then set up mycompany.com within mPanel's DNS Hosting section. Make sure to create A records for ns1 and ns2.

If you want to self-host, when running through cPanel's web-based setup make sure you check the boxes at the bottom of step 4 to create the required A records.

 

 

 

Manual Installation

If you selected "pre-installed" when signing up for your VPS, please skip this section and go directly to WHM Setup for information on completing the web-based installation.

The cPanel installation guide is available at http://docs.cpanel.net/twiki/bin/view/AllDocumentation/InstallationGuide/Quick-StartInstallationGuide

Here we present a condensed guide, with a few elements specific to Mammoth VPS.

To get started, SSH into your new VPS - if you are not sure how to do this, check out our SSH guide. Mammoth VPS comes pre-configured with a a sudo account called "vps" while the "root" does not have a password. cPanel however, requires "root" account to have a password, so that will be our first step.

In the following text, what you need to type is shown after the $ or # prompt. First, obtain a root prompt with sudo:

$ sudo -i

Next, set a password on the root account:

# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

If you want to use per-customer disk quotas, edit /etc/fstab:

# yum install nano ; nano /etc/fstab

You want to change the following line:

/dev/xvda2 / ext3 rw,noatime,nodiratime,errors=remount-ro 0 0

So that it reads:

/dev/xvda2 / ext3 rw,noatime,nodiratime,errors=remount-ro,usrquota 0 0

(ie, add ",usrquota" after the "errors=remount-ro" part). Press Ctrl+X to exit, then Y when prompted to save your changes. Finally, reboot the VPS to enable this change to take effect.

Installing

With a root password set, you are now ready to follow the cPanel installation guide. To summarise the guide, change to the /home directory:

$ sudo -i
# cd /home

Then download the installer:

# wget -N http://layer1.cpanel.net/latest

Now run the installer, which takes about 3 hours to download and install everything. Fortunately, it does not ask any questions while running, so you can ignore the installer while its running:

# sh latest

Finally, activate your license:

# /usr/local/cpanel/cpkeyclt

 

 

 

WHM Setup

Once the installer finishes, to access the interface open https://$IP:2087 in your web browser.

  • $IP is meant to stand for the IP address of your web server. For example https://110.232.115.100:2087/
  • Use root as the login name in the Name field.
  • Use the password supplied during signup for pre-installed, or the password you set on the root account earlier in the manual installation guide.

You will then be prompted to complete a web-based setup process.

Step 1: Simply accept the agreement.

Step 2: Enter your email address as prompted, and make sure the hostname is displayed correctly. The rest can usually be left on the default values.

Step 3: If you purchased additional IPs, make sure you add them during this step. Mammoth VPS by default, will only configure your primary IP leaving the others up to you.

Step 4: Enter ns1.mydomain.com and ns2.mydomain.com as your two nameservers. If you are intended to self-host the mydomain.com zone, make sure you check the two boxes at the bottom of the page.

Step 5: Can usually be left as is.

Step 6: If you enabled usrquota in /etc/fstab earlier, be sure to do so on this step too.

Other Notes

The "Nameserver IPs" feature of WHM may give you the error "Sorry, you are out of IPs to assign as nameservers." even though you have not assigned any of your IPs within that interface to nameservers. We have contacted cPanel support about this issue and have been informed that the "Nameserver IPs" feature is purely informative.

That is, its simply a way for you as the administrator to have a centralised list of nameserver-IP pairs. At a low-level, its a method of editing /etc/nameserverips and has no other interaction with the WHM software. There are a few solutions:

  1. Simply do not use this area of WHM. WHM will automatically bind your DNS server to every IP you have available; so from WHM's perspective this feature has no purpose. It is not necessary to setup the Nameserver IPs section within WHM for DNS to function correctly.
  2. Go into "Server Configuration" then "Tweak Settings". Under the "System" tab, change the "Enable WHOIS lookups for the nameserver IP manager" to Off and then click "Save". The "Nameserver IPs" section should then work normally.
  3. You can edit /etc/nameserverips via SSH. The file format is IP=hostname , one per line. For example:
  4. 110.232.113.10=ns1.mycompany.com
    110.232.113.11=ns2.mycompany.com
    
Preload Preload Preload