Your web hosting partners since 2004.
Buy now »

How to setup a cPanel server using OpenVZ

To make it super simple and easy to setup cPanel on an OpenVZ server, we've created a script to do the heavy lifting for you.

You just need to configure the definitions at the top of the script, then run it.


vzctl create ${CTID} --ostemplate ${OS_TEMPLATE} --hostname ${CTID_HOSTNAME} --ipadd ${CTID_IP} --ipadd ${CTID_IP_MAIL}
vzctl set ${CTID} --diskspace ${DISK_SPACE}:${DISK_SPACE} --save
vzctl set ${CTID} --nameserver ${NAMESERVER_1} --nameserver ${NAMESERVER_2} --nameserver ${NAMESERVER_3} --save
vzctl set ${CTID} --onboot yes --save
vzctl start ${CTID}
vzctl exec ${CTID} 'yum -y groupremove "FTP Server" "GNOME Desktop Environment" "KDE (K Desktop Environment)" "Mono" "Mail Server" "E-mail Server" "Web Server" "X Window System"'
vzctl exec ${CTID} echo SELINUX=disabled>/etc/selinux/config
vzctl exec ${CTID} echo SELINUXTYPE=targeted>>/etc/selinux/config
vzctl exec ${CTID} chkconfig iptables off
vzctl exec ${CTID} service iptables stop
vzctl exec ${CTID} yum -y update
vzctl exec ${CTID} yum -y install perl nano
vzctl exec ${CTID} cd /home
vzctl exec ${CTID} wget -N -O /home/latest
vzctl exec ${CTID} sh /home/latest --force
vzctl exec ${CTID} /scripts/configure_rh_firewall_for_cpanel

echo Done!

Simply copy this to something like on the hardware node, then run it using sh

That's it!

Last updated: 2022-02-20

« Go Back

Order now »

The support has been fantastic with help in areas they are not obliged to offer but still do.