1

I have contracted a linux VPS and a domain (www.myproject.com). After that, in the same site from my user area, I have registered a pair of DNS (ns1.myproject.com and ns2.myproject.com) associating them to the VPS's IP.

Now I know I should add an A record, but.. could I do that from the terminal? or must I contract a control panel, for example Plesk?

If I can do it from the terminal, how can I do it?

  • Have you installed name server on your VPS? by the way you don't need to use your own name servers, most registrars allow you to use their name servers and then just add the A records. – Simon Hayter May 23 '13 at 11:21
  • bybe, how do you install a name server on an VPS? – tirengarfio May 23 '13 at 11:35
1

In answering your first question this depends on the DNS software you decide to use on the server. I am going to use Bind in my answer here as it is the most commonly used DNS server on Linux servers used as far as I am aware.

Can DNS A Records Be Added From The Terminal:
It depends on how you interpret this part of the question. Strictly speaking you can add A records in BIND from the terminal, but in the sense that you open up the zone file in your chosen terminal text editor (Vi, Joe, etc) and add the A record to the configuration in the zone file, and then save the changes and restart the Bind service. If you are asking is there a single command you can use to add A records from the terminal, eg: sudo bind add 'www.example.com' A '55.55.55.55' then no there is no current command such as this that I am aware of. As for using a control panel, this really boils down to how confident of a sysadmin you are with the command line and what your personal preferences are. A control panel, while it will cost a fair bit of money, will make a lot of tasks quicker as you can just point and click from a single unified interface from any machine with a web browser, and will make integrating it with third party systems easier as most of these control panel systems have API's to allow you to connect them to your own existing systems. The downside though aside from the cost is that you loose a bit of flexibility in the configuration and how the system works as you are bound to the way the control panel needs the environment setup.

How Do You Install a Name Server on a VPS:
Assuming you are using a debian-based VPS such as debian, Ubuntu, etc, the command is simple...
sudo apt-get install bind9
Now configuring it is outside of the scope of this question and answer but there are a large number of tutorials out there on how to configure BIND.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.