How to build a WHM/cPanel Server running CentOS 7 at Vultr.com
- Remove the Network Manager program:
yum remove NetworkManager -y
- Verify that there is a hostname installed on the server.
hostname
- Install perl:
yum install perl
- Install Curl:
yum install curl
- Download latest installer:
curl -o latest -L https://securedownloads.cpanel.net/latest
- Run the WHM/cPanel Script (should take about 25 minutes to run):
sh latest
- Update the WHM/cPanel License if it does not show that you are using a trial license.
/usr/local/cpanel/cpkeyclt
- Update DNS Zone Template to include DMARC entry to the DNS when a new domain name is added. (DNS and Edit Zone Templates):
_dmarc IN TXT “v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s; rua=mailto:postmaster@%domain%; ruf=mailto:postmaster@%domain%; rf=afrf; pct=100; ri=86400”
- Update MySQL service to bind the service to only a local address:
nano /etc/my.cnf
bind-address=127.0.0.1
- Fix an issue with the server sending email as hostname.servername gets blocked by spam filters:
nano /var/cpanel/users/nobody
DNS=hostname.domain.com
And then run this command:
/usr/local/cpanel/bin/dkim_keys_install nobody
- Fix an issue with the Resolver Configuration reverting back to default after a reboot.
chattr +i /etc/resolv.conf
To remove the immutable file at any point later on, you can do:
chattr -i /etc/resolv.conf