===== Install cPanel and CloudLinux =====
Install CentOS 8 on the server
Create ''/home'' partition
Install extra packages
yum install wget mosh
Open firewall ports for ''mosh''
firewall-cmd --add-service=mosh --permanent
Disable SELinux: Edit the ''/etc/selinux/config'' file to set the SELINUX parameter to disabled.
==== Install cPanel ====
https://docs.cpanel.net/installation-guide/install/
Setup services according to the guide
systemctl stop firewalld.service
== Install cPanel ==
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
==== Install CloudLinux ====
wget http://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
sh cldeploy -k yourkey
Now reboot the server
==== Setup cPanel ====
In "Manage Plugins" install ClamAV, Calendar and Contacts Server, Solr
Copy configuration from existing cPanel server using "Transfer Tool"
Update setting "Host to publish in the SRV records for Outlook autodiscover support" to the current hostname.
==== Setup CloudLinux Features ====
Go to "CloudLinux LVE Manager" and install the features you want.
Change the group of admin users to wheel
==== System Setup ====
Change ''/etc/ssh/sshd_config''
Port 223
Add firewall rule
firewall-cmd --permanent --zone=public --add-port=223/tcp
firewall-cmd --reload
Add group ''groupadd hostinggl''
Create file ''/etc/sudoers.d/hostinggl'' containing this snippet
# Allow members of group hostinggl to execute any command
%hostinggl ALL=(ALL:ALL) ALL
==== Setup for Hosting.gl ====
== DNS ==
Add hook to unset NSEC3 when DNSSEC is enabled, because otherwise it cannot be transferred to the DNS slave server.
Put script in ''/opt/hostinggl/unset_nsec3.php''
#!/usr/local/cpanel/3rdparty/bin/php -q
array(),'data'=>array(), 'hook'=>array());
}
// Return the output.
return $input_data;
}
Run command to add the hook
/usr/local/cpanel/bin/manage_hooks add script /opt/hostinggl/unset_nsec3.php --stage post --category Cpanel --event UAPI::DNSSEC::enable_dnssec --manual
Add cronjob
# Sync DNS to master.ns.gl
* * * * * sh /opt/hostinggl/copy_zones_to_ns.sh