Hi,
1 :: To configure DNS, named service must be installed on the Ubuntu box. Default named service for Ubuntu is BIND. If BIND is not installed on your server, then you can install it with the help of following command.
Quote:
|
root@Ubuntu # apt-get install bind9
|
To install BIND service, you must be logged into your server with user root.
2 :: To make your domain only, you need to add the DNS entries for on the server for your domain. For example, your domain name is example.com. You need to add example.com in file /etc/bind/named.conf.local under BIND configuration.
Open the file with the help any linux editor and add the following lines of code in it.
Quote:
|
root@Ubuntu # vi /etc/bind/named.conf.local
|
Quote:
zone "example.com" {
type master;
file "/etc/bind/zones/example.com.db";
};
|
Save and quit from the editor.
3 :: Create a directory with name zone.
Quote:
|
root@Ubuntu # mkdir /etc/bind/zones
|
4 :: Create zone file under the zone directory for the domain.
Quote:
|
root@Ubuntu # vi /etc/bind/zones/example.com.db
|
And add the following line of code in it.
Quote:
example.com. IN SOA ns1.example.com. admin.example.com. (
2006071801
28800
3600
604800
38400 )
example.com. IN NS ns1.example.com.
example.com. IN MX 10 mail.example.com.
www IN A XX.XX.XX.XX
mail IN A XX.XX.XX.XX
ns1 IN A XX.XX.XX.XX
|
Save and quit from the editor. Now restart the BIND service on the server with the help of following command.
Quote:
|
root@Ubuntu # /etc/init.d/bind9 restart
|
That's all you are done.
Note ::
=====
1 :: Domain example.com must be replaed with your domain.
2 :: XX.XX.XX.XX must be replaced with your server IP.