Answer: Do the following steps as:
1. Rename the file named.caching-nameserver.conf into named.conf file located into /var/named/chroot/etc
#mv /var/named/chroot/etc/named.caching-nameserver.conf /var/named/chroot/etc/named.conf
2. Check the permission and ownership as well as SELinux Context should be like as:
-rw-r----- root named system_u:object_r:named_conf_t /var/named/chroot/etc/named.conf
If selinux context is mismatch use the restorecon –R /var command
3.vi /etc/named.conf
zone “example.com” IN {
type master;
file “example.com.zone”;
};
/var/named/chroot/etc/named.conf file is used to register the zone as well as specify the global option for DNS server. There are two types of zone, i. Master, which contains the original data. ii. Slave, backup of master. Here is the example of master zone configuration.
4.vi /var/named/chroot/var/named/example.com.zone
$TTL 345345
@ IN SOA @ webmaster.example.com.(
101;Serial Number
1H;Refresh Time
1M;Retry Time
1W;Expire Time
1D;Minimum Time to Live
)
@ IN NS 192.100.0.X
www 0 IN A 192.100.0.1
www 0 IN A 192.100.0.2
www 0 IN A 192.100.0.3
www 0 IN A 192.100.0.4
www 0 IN A 192.100.0.5
3.service named start
4.rndc reload
5.chkconfig named on
6. Check the permission as well as SELinux Context should like this:
-rw-r--r-- root named root:object_r:named_zone_t /var/named/chroot/var/named/example.com.zone
If selinux context is mismatch use the restorecon –R /var command
7.service named start
8.rndc reload
9.chkconfig named on
Zone file should create on /var/named/chroot/var/named. Default Directory Path is specified on /var/named/chroot/etc/named.conf file.
$TTLTime To Live, How much seconds cache server stores the information about DNS. And Five Parameters specified Serial Number used by slave to synchronize withmaster server. Refresh and Retry Time used by slave server. NS is the Name (DNS) server where lookup the domain. A (Associated IP) for particular host.