Create Centos OS (Operating System) Template with WHM/cPanel Pre-Installation Easy Tutorial with Screen Shots

In this Tutorial we will describe How to Setup CentOS OS Template with Pre-Installed cPanel/WHM Control Panel.
Creating an OS Template for WHM/cPanel is one of the most discussed Topic in VPS Industry. This is a perfect detailed tutorial for those, who Offer Managed or Unmanaged Linux VPS Servers and want to setup a CentOS OS Template with Pre-Installed WHM/cPanel.

Tutorial Note:
Basically WHM/cPanel takes a lot of time to install on a Linux VPS or Dedicated Server. So if you are a managed VPS Server Provider, setting up an OS Template with Pre-Installed Control Panel can save you Hours of time. Setup a OS Template with cPanel installed, so whenever a client signup for your VPS and choose that OS Template, VPS will be setup automatically with OS+WHM/cPanel.

In This Tutorial, i will use OpenVZ virtualization with SolusVM VPS Control Panel. I will try my best to describe each and every step with screen shots.

1: First of all, Setup a Linux VPS with Latest Centos 6 (64bit recommended) with at least 1GB of RAM. You can choose your desired hostname and root password for this VPS. Once you setup, login to your VPS SSH.

2: Install WHM/cPanel on your VPS. You can follow this Guide of WHM/cPanel official Blog. Installation of WHM/cPanel control panel can take few hours to complete depending on your VPS Network Speed.

3: Once WHM/cPanel is installed on your Server, Now you can configure WHM/cPanel Settings Wizard like a regular WHM/cPanel based VPS Server. You can Follow below screen shots for better setup your VPS, or can use your custom settings too,

Set a temporary email Address, so your VPS Customer can change/setup their own Email Address here.

cpanel installation wizard 1

You can Setup a Temporary Hostname, users can modify according to their needs.
In Resolvers Section, Update your Network/Data Center configuration according to your network Setup, or use Google DNS Resolvers in your VPS as suggested in below Screen Shot.

cpanel installation wizard 2

On DNS Setup Wizard of cPanel,
Please do not “Check mark” any of the “A Entires” Filed, or Server will add A Records for IPs. Also do not write any IPs in Nameserver IP Fields.
In Nameservers Field, you can setup Temporary Nameservers such as, NS1.YOURDOMAIN.COM, NS2.YOURDOMAIN.COM
VPS Client can modify them on their VPS.

cpanel installation wizard 3

4: Now you can Complete the VPS cPanel Startup Setup Wizard. Once you complete the Setup Wizard, you can login to your WHM.

5: Now your WHM/cPanel Installation is completed. But you should setup WHM/cPanel server with all PHP and Apache Modules and all Server Security Settings such as,

  • Perform all WHM/cPanel Basic Tasks
  • Run EasyApache, and install all required PHP and Apache Modules and Setup Default PHP Version, Apache Version, all other CMS Based PHP Plugins
  • Setup php.ini Custom Settings through SSH, such as Setting up PHP memory size, Max File Upload Size, Disabling Risky PHP Modules
  • Install Firewall, Mod_Security, Softaculous and all other Tools you Offer with your Services
  • Perform complete Security Audit of your Server
  • Finalize your VPS WHM/cPanel Setup and SettingsWhen you are satisfied that, all necassarry settings are completed and your installation is now done logout your WHM Account.

6: Now login to your Server SSH via SSH Software such as Putty, and run the following command in SSH

rm -rf /etc/.whostmgrft

Removing “whostmgrft” will remove the “WHM Startup Setup Wizard” we ran earlier after installing WHM/cPanel. So your VPS Customer can setup their Server Hostname, Nameservers and all other configurations as per their own VPS Setup and Requirements. All Other Settings of Server and Installed Applications will remain in that Server.

Now close your SSH Session and logout your Server. Our First Step of Tutorial is now completed. Now we need to create this cPanel/WHM VPS Server’s OS Template.

1: Now login to your Solusvm and go to VPS Server Account through Virtual Servers => List Virtual Servers Option.

2: On VPS Server management screen, There will be an option “Create Template”. Click on this Option to create your OS Template.

solusvm vps setup 1

Write your OS Template Name and click on Create Template Button

solusvm vps setup 2

Creating OS Template will take sometime to complete the Custom OS Template. Once it is completed, a message will appear in Server Log Messages.

Once OS Template Creation Task is completed, Now you can Add OS Template to your available OS Templates.
Click on “Media => Add OpenVZ Template” Button. (You can choose your own virtualzation depending on your Server Setup.

solusvm vps setup 3

On Next Page, you can Setup your OS Template,

  • Write your Template Name
  • Write your Template Description
  • Choose your Newly Created CentOS 6 Template with cPanel (It will appear in your OS Templates List)
  • Choose Status as “Active”
  • Choose your Template Arch as “86_64” for 64bit Setup

solusvm vps setup 4

Now your Customer OS Template is created successfully. You can test your OS Template by setting up a new Test VPS with newly created OS Template.
If you face any issues or confusion during setting up your OS Template, you can comment to this tutorial, we will try our best to help you.