To install the DNS steps:
1. Mount the CD and install the main program and camouflage package
Mount/dev/cdrom/mnt
cd/mnt/packages/
RPM-IVH bind-9.7.0-5.p2.el6.i686.rpm
RPM-IVH bind-chroot-9.7.0-5.p2.el6.i686.rpm
2. Copy the Master profile and the zone profile and change the owner to named
Cp-p/etc/named.conf/var/named/chroot/etc/
Cp-p/var/named/named.empty/var/named/chroot/var/named/jiangwenhui.com.zone
Cp-p/var/named/named.empty/var/named/chroot/var/named/192.168.100.zone
Cp-p/var/named/named.*/var/named/chroot/var/named/
Chown named/var/named/chroot/var/named/
3. Modify the master configuration file
Options {
Listen-on Port: (any;};
Listen-on-v6 Port 53 {:: 1;};
Forwarders {8.8.8.8;};
Directory "/var/named";
Dump-file "/var/named/data/cache_dump.db";
Statistics-file "/var/named/data/named_stats.txt";
Memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query {any;};
recursion Yes;
Add the following before the last line
Forwarders {8.8.8.8;};
Zone "Jiangwenhui.com" in {
Type master;
File "Jiangwenhui.com.zone";
};
Zone "100.168.192.in-addr.arpa" in {
Type master;
File "192.168.100.zone";
};
4. Modify the zone configuration file
Cd/var/named/chroot/var/named
Vim Jiangwenhui.com.zone
$TTL 3H
@ in SOA @ rname.invalid. (
0; Serial
1D; Refresh
1H; Retry
1W; Expire
3H); Minimum
NS ns.jiangwenhui.com.
NS in A 192.168.100.254
FTP in A 192.168.100.254
www in A 192.168.100.254
Mail in A 192.168.100.254
Vim 192.168.100.zone
$TTL 3H
@ in SOA @ rname.invalid. (
0; Serial
1D; Refresh
1H; Retry
1W; Expire
3H); Minimum
NS ns.jiangwenhui.com.
254 in PTR ns.jiangwenhui.com.
254 in PTR ftp.jiangwenhui.com.
254 in PTR www.jiangwenhui.com.
5. Start the service and turn off SELinux and firewalls
Service named start
Setenforce 0
Service Iptables Stop
Second, the construction of master-slave DNS
Plan IP Master DNS192.168.1.111 from DNS192.168.1.112
1. Modify the primary DNS configuration file
Zone "Jiangwenhui.com" in {
Type master;
File "Jiangwenhui.com.zone";
Allow-transfer {192.168.100.25;};
};
Zone "100.168.192.in-addr.arpa" in {
Type master;
File "192.168.100.zone";
Allow-transfer {192.168.100.25;};
};
2. Installing the main program and spoofing package from the DNS server
Ibid. installation process
3. Copying the master configuration file
Cp-p/etc/named.conf/var/named/chroot/etc/
4. Modify the master configuration file from DNS
Zone "Winsnet.com" in {
Type slave;
File "Slave/winsnet.com.zone";
Masters {192.168.1.111;};
};
Zone "1.168.192.in-addr.arpa" in {
Type slave;
File "Slave/192.168.1.zone";
Masters {192.168.1.111;};
};
5. Create slave in the Zone profile directory to store the ask price from DNS zone configuration
Cd/var/named/chroot/var/named
mkdir slave
Cp-p/var/named/named.*/var/named/chroot/var/named
Chown-r named/var/named/chroot/var/named
6. Restart the service and see if the slave directory is synchronizing the successful zone profile
Note: To close the firewall and SELinux during the experiment
Linux DNS Deployment commands