Whilst trying to install DNS Only, you run into this annoying RAM warning:
2024-10-09 05:51:15 370 [5358] ( INFO): Checking RAM now... 2024-10-09 05:51:15 375 [5358] (ERROR): cPanel & WHM requires a minimum of 2048 MB of available RAM for your operating system. Your system only has 1107 MB available. We recommend that you increase the total RAM on your system. 2024-10-09 05:51:15 46 [5358] ( INFO): cPanel is here to help! Our technical KnowledgeBase and cPanel Community is just a click away at https://support.cpanel.net/ 2024-10-09 05:51:15 376 [5358] (FATAL): Increase the server's total amount of RAM, and then reinstall cPanel & WHM.
As an experienced system administrator you know that actually a basic BIND and web server doesn’t need anywhere near 2 GB RAM, so you decide to investigate. It turns out you can override the broken behavior with these steps:
sh latest-dns-only --keep cd installd
Look for this in Installer.pm
:
INFO("Checking RAM now..."); my $total_memory = $self->get_total_memory(); my $minmemory = 2_048;
Change the 2_048
above to 1_024
or even 512
if you have less RAM.
Add a swap file (e.g. 1GB):
dd if=/dev/zero of=/swapfile bs=1024 count=1048576 chmod 600 /swapfile mkswap /swapfile swapon /swapfile vi /etc/fstab [/swapfile swap swap defaults 0 0]
Now you can continue the installation:
./bootstrap-dnsonly
Trouble?
If your installation now continues on AlmaLinux 9 and it suddently freezes, and you were here:
2024-10-09 06:00:03 716 [5933] ( INFO): The system set the clock to: Wed Oct 9 06:00:03 2024 2024-10-09 06:00:03 726 [5933] ( INFO): The system changed the clock by 0 seconds. 2024-10-09 06:00:03 751 [5933] (DEBUG): - ssystem [BEGIN]: ps -U nscd -h 2>/dev/null || /sbin/service nscd start 2024-10-09 06:00:03 751 [5933] (DEBUG): Redirecting to /bin/systemctl start nscd.service 2024-10-09 06:00:03 751 [5933] (DEBUG): Failed to start nscd.service: Unit nscd.service not found. 2024-10-09 06:00:03 751 [5933] (ERROR): - ssystem [EXIT_CODE] 'ps -U nscd -h 2>/dev/null || /sbin/service nscd start' exited with 5 2024-10-09 06:00:03 751 [5933] (DEBUG): - ssystem [END]
This could be because you’re out of RAM. Check if the swap file is working properly with free -m
.
Reference
- Adapted from https://support.cpanel.net/hc/en-us/community/posts/19637188948631-Any-way-to-override-RAM-check-on-install