CPanel Override Memory Requirement, Install with 512MB

I recently replaced one of our cPanel DNS-only nameservers. Typically we run our DNS servers with 512MB of memory, because why would a simple DNS server need any more than that? I was shocked to see that cPanel, even the free DNS-only version, now requires 768MB of memory if you’re using CentOS7/RHEL6 or 1GB if you’re using CentOS7/RHEL7. If you are like us and are using a VPS to host your DNS, this can double your cost spent to maintain your DNS servers.

CPanel refuses to install if you’re running with 512MB of memory. Fortunately, there is a fairly simple way to override the memory requirement. After Googling and finding many people asking the same question with very few answers posted, I thought I would share the method that helped me.

First, you will want to download the installation script (the curl statement) from the official cPanel website (click here).

curl -o latest-dnsonly -L

Run the installation script, but add the –keep flag. It’s going to fail and tell you that your server does not meet the minimum memory requirement. That’s okay.

sh latest-dnsonly --keep

You’ll notice that the –keep flag caused it to save several files to the directory containing your shell script. Enter the “installd” directory and open the “install” file for editing.

cd installd
vim install

You are looking for the line below that defines the memory requirements. Change them to anything equal to or lower than your system’s total memory. We are running 512MB, so I changed the default to 512. If you’re using CentOS 7, you’ll need to change the “7” line too. Save and exit the file.

my $min_memory_rules = {
	default => 512,      # CentOS 5/6 => in a better world should be 512
	7       => 1_024,    # CentOS 7

Lastly, rerun the installer by executing the “bootstrap-dnsonly” script and you should be good to go!

sh bootstrap-dnsonly


Leave a Reply