Create a CentOS & cPanel OpenVZ Template - SolusVM

Everything to do with our VPS Reseller Account

Was This Helpful

Yes
1
100%
No
0
No votes
 
Total votes: 1

Scott
Support Group
Support Group
Posts: 22
Joined: Tue Apr 30, 2013 6:03 pm
Contact:

Create a CentOS & cPanel OpenVZ Template - SolusVM

Postby Scott » Mon Mar 23, 2015 2:21 am

Create a CentOS & cPanel OpenVZ Template with SolusVM


Having a pre-made template with cPanel already installed is a great way to deliver VPS Containers to your customers fast. In this guide we're going to make a CentOS 6.5 & cPanel template with CSF and DDOS Deflate.


1. Create your VM with your CentOS version chosen.

2. SSH into your VM.

3. Run the following commands to remove GroupServices that will not be needed:

Code: Select all

yum grouplist


4. Remove the following if they appear in your grouplist:

Code: Select all

  FTP Server
    GNOME Desktop Environment
    KDE (K Desktop Environment)
    Mail Server or E-mail Server
    Mono
    Web Server
    X Window System


To remove multiple group services use quotes:

Code: Select all

yum groupremove "Mono" "Mail Server"


5. Edit /etc/selinux/config from the command line and set the SElinux parameter to disabled using a text editor, such as nano or vi. If your using a minimal template then SElinux is likely not installed. If you get a "New File" box when using the below command move on.

Code: Select all

nano /etc/selinux/config


If it comes up empty you are good to go. If you do not have nano installed just do a:

Code: Select all

yum install nano 


6. We now need to disable the default firewall and check for updates: (Enter Y to confirm Updates)

Code: Select all

chkconfig iptables off

service iptables stop


7. Now lets verify the TMP directory permissions:

Code: Select all

stat /tmp



Should Output:

Code: Select all

Access: (1777/drwxrwxrwt)  Uid: (  0/  root)  Gid: (  0/  root)



If it doesn't, run this:

Code: Select all

chmod 1777 /tmp


8. Now let's install cPanel/WHM. We're going to use an installer we created to cut down the steps needed. It will also install some Perl Modules, CSF and DDOS Deflate and do "yum update"

Code: Select all

wget https://first2host.co.uk/servers/cpanelinstall.sh

sh cpanelinstall.sh


9. Ok, so cPanel is installed and you are able to access WHM (if you do not know how to, visit: https://YOURSERVERIP:2087)

-Now that you are in WHM you have come up to the Setup Wizard. Change the fields for the contact email and hostname to some random chars such as (youremail@yourdomain.com). Do NOT use your email, or your clients will see it every time!



Now that you have gone through WHM and customized everything, maybe installed Softaculous or other add-ons. It is now time to reset the box and create your Template.



10. Open an SSH to your VM, and type the following: This assumes you logged into the VM and configured cPanel, If you didn't skip this step

Code: Select all

ls -alh /etc/.whostmgrft

-rw-r--r-- 1 root root 0 Feb  1 08:07 /etc/.whostmgrft

rm -rf /etc/.whostmgrft



11. Log into your SolusVM Master and shutdown the VM you just setup.


12. Inside the VM details in SolusVM you will see a "Create Template" button. Push This Button!


13. Give your template a filename, then hit the Create Template Button, and away she goes!

You should not see the new template ready to deploy to VM's with cPanel, CSF and DDOS Deflate installed already

Who is online

Users browsing this forum: No registered users and 1 guest