System installation 2. Set the IP address, gateway, and DNS Convention: the first Nic is the Internet, and the second Nic is the Intranet (the Intranet must be configured on the second Nic for machines without the Internet)
I. Install software
Yum-y install bind-chroot bind-libs bind-utils caching-nameserver
Ii. Configuration
Cd/var/named/chroot/etc/
Cp-p named. caching-nameserver.conf named. conf
Options {
Directory "/var/named /";
};
Zone "test.com" IN {
Type master;
File "test.com. zone ";
};
Zone "linux.com" IN {
Type master;
File "linux.com. zone ";
};
Zone "1.168.192.in-addr. arpa" IN {
Type master;
File "192.168.1.zone ";
Allow-update {none ;};
};
Cd/var/named/chroot/var/named/
Cp-p localdomain. zone test.com. zone
Cp-p localdomain. zone linux.com. zone
Cp-p named. local 192.168.1.zone
# Test.com. zone
$ TTL 86400
@ In soa @ root (
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns @
In a 127.0.0.1
In aaaa: 1
Wwwtest in a 192.168.1.122
Dnstest in a 192.168.1.20.
Mytest3 in a 192.168.1.144
# Linux.com. zone
$ TTL 86400
@ In soa @ root (
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns @
In a 127.0.0.1
In aaaa: 1
Wwwtest in a 192.168.1.123
Dnstest in a 192.168.1.134
Mytest3 in a 192.168.1.145
# 192.168.1.zone
$ TTL 86400
@ In soa @ root (
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns @
In a 127.0.0.1
In aaaa: 1
192.168.1.123 in a wwwtest
192.168.1.134 in a dnstest
192.168.1.145 in a mytest3
Ii. Restart the named service
Service named restart