Menu Close

How to build a WHM/cPanel Server running CentOS 7 at

How to build a WHM/cPanel Server running CentOS 7 at

  1. Remove the Network Manager program:

    yum remove NetworkManager -y
  1. Verify that there is a hostname installed on the server.

  1. Install perl:

    yum install perl
  1. Install Curl:

    yum install curl
  1. Download latest installer:

    curl -o latest -L
  1. Run the WHM/cPanel Script (should take about 25 minutes to run):

    sh latest
  1. Update the WHM/cPanel License if it does not show that you are using a trial license.

  1. 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”
  1. Update MySQL service to bind the service to only a local address:

    nano /etc/my.cnf
  1. Fix an issue with the server sending email as hostname.servername gets blocked by spam filters:

    nano /var/cpanel/users/nobody

    And then run this command:

    /usr/local/cpanel/bin/dkim_keys_install nobody
  1. 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