Install NSD DNS In A Low Memory VPS

Got root? Then you have your freedom to do whatever you want with your slice of node. People moved from shared or reseller hosting to vps because they want to experiment more with their (in this case) website. Probably tried another web server such as Cherokee, Engine-X, Lighttpd, or Litespeed. For database, they want to experience other than MySQL, like MariaDB (the MySQL development-based database), PostgreSQL, or NoSQL. The rest, of course PHP (we are talking about linux OS), no way in the 21st century you still run your dynamic website with HTML only.

Everything is set up, and you go check your domain whois, your domain nameserver appeared as ns1.anotherdomainnotyourdomainhere.com. You still use 3rd party DNS, usually your domain registrar’s DNS or DNS that many people use such as afraid, he.net, etc.. For me small business site like company profile, merchandise, or store, it will be good to use own domain as your nameserver. As the title says, low memory vps for people who have just started small business, so the NSD low memory DNS is suitable for it.

For this, i am using 128MB KVM with Debian 6 OS, it is quite low in memory consumption. I assume you have installed your preferred low memory webserver, database, and php, so i just headed to NSD installation.

Just like that, you have installed NSD DNS in your box, simple eh? Now continue with the configuration. Go to “/etc/nsd3” directory and create NSD server configuration. Below are the essential configurations i took from NSD’s default configuration.

Change the configurations needed and save as nsd.conf, and now we create Zone Configuration, here for the example i have domain “your_domain_here.com” and want to create “ns1.your_domain_here.com” and “ns2.your_domain_here.com” for name server.

The first is SOA (Start Of Authority), contains as the first line until the closing parenthesis, you can edit it base on your data and needs. The second until the fourth line i am pointing the domain and nameserver to our static vps ip address as A Record. And for the last two, we declare your_domain_here.com to use ns1 & ns2 dot your_domain_here.com.

So the configurations are set, now we rebuild the NSD database, reload it, and start.

Easy right? Yeah it is. Don’t forget to register your nameserver and set your domain nameserver in your domain control panel, and you are your website is ready to go!

Leave a Reply