You have enough of shared hosting and/or the costs for bandwidth are too high? OK, the next step is your own dedicated server, but with a limited budget it’s hard to find a good and cheap managed server.

For all beginning server administrator is this guide about how-to setup the DNS for a server with a DirectAdmin control panel.

Why DirectAdmin (DA)?
I like this control panel at most, it’s fast, frequently updated and there are updates also for the latest PHP and MySQL version. I’m sure there are much more pros and of course there are more powerful control panel systems.

If you buy an unmanaged dedicated server, the operating system and DirectAdmin should be installed. If not, you need to do it by yourself (check the DA website for further information). I guess this is a hard job for a beginner, if you need to start from the beginning try to use Ubuntu, this Linux distribution works great with DirectAdmin.

First of all you need to login to your DirectAdmin control panel, click “IP management” and enter the two IP addresses (we use the IP addresses 12.34.56.78 and 12.34.56.79 for our example) you got from your hosting provider (the first server IP address should be already in the list)

Next from the admin panel, switch to the “User level” and click on “DNS Management”. Enter here the DNS records you need for your domain name / host. Don’t forget you need to enter also the two name server entries (there is a trailing dot (.) behind the value).

To setup the DNS and name servers for your server you need use the domain name you have used in the local DNS setup before. Configure the domain with your “global” DNS (domain) provider as follow (these are the two IP addresses you have configured within DirectAdmin):

ns1.domain.com -> 12.34.56.78
ns2.domain.com -> 12.34.56.79

These name server entries need some time to populate to the internet (up to 24-48 hours).

In the meantime we need to add some more setting to the web server. Login to DirectAdmin and click “Administrator Settings”. Enter a server name within the field “Server’s Hostname”, I used serv01.domain.com. Enter the name server entries you have used before for the fields NS1 and NS2 and leave the DA control panel.

DA admin settings

Now connect to your server via SSH (use Putty). Login as root (sudo) and enter:

nano /etc/hosts

With this command you enter the file “hosts” with the text editor Nano some distro’s may not include Nano in which case you may wish to use Pico or the adventurous Vi, add this row (check the Linux MAN pages how to insert text with teh editor Vi):

12.34.56.78 srv01.domain.com srv01

And save the file via ctrl+x (confirm to save the file) or :wq if you edit the file with Vi.

That’s all, you’re done!

I know there are much more distributions and also other cool control panel systems and I hope this guide will help you even if your system is different.

Advertisement:
Dedicated Root Servers from the World’s # 1 Web Host. Powerful servers for just $99 per month! Pay less and get more with 1&1.