In a nutshell, you need to install the latest version of BIND (if you haven't, I assume you have).
Start the service:
Code:
/etc/init.d/named start
Set it to always start on boot:
Code:
chkconfig --levels 2345 named on
You tell named how to run in the configuration file /etc/named.conf, and you also put the information about which zones it will be authoritative for. An example named.conf:
Code:
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
recursion no;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/rndc.key";
zone "mydomain.com" {
type master;
file "/var/named/mydomain.com.db";
};
And then, at /var/named/mydomain.com.db, you have the zone file, which might look like this:
Code:
; Zone File for mydomain.com
$TTL 14400
@ 14440 IN SOA ns1.your-authoritative-NS.com. your.email.address. ( 2006102400
14400
7200
3600000
86400
)
mydomain.com. 14400 IN NS ns1.your-authoritative-NS.com.
mydomain.com. 14400 IN NS ns2.your-other-nameserver.com.
mydomain.com. 14400 IN A 1.2.3.4
mydomain.com. 14400 IN MX 0 mail.mydomain.com.
mail 14400 IN A 1.2.3.4
www 14400 IN CNAME mydomain.com.
There's much, much more. That should get you started, but I highly recommend you give a read to
DNS and BIND by Paul Albitz and Cricket Liu.