Preparations (assuming the name is bigcloud. Local)
# Change host name # vi/etc/sysconfig/Network # Created by anacondanetworking = yeshostname = bigcloud. local # modify the file/etc/hosts with the following content: 127.0.0.1 localhost. localdomain localhost4 localhost4.localdomain4: 1 localhost. localdomain localhost6 localhost6.localdomain6192.168.188.135 bigcloud. localdomain # modify DNS configuration # vi/etc/resolv. add the following dns1 = 192.168.188.11dns2 = 192.168.188.12domain = bigcloud. local installation of bindrpm-uvh bind-9.9.4-14.el7.x86_64.rpm |
Start configuring the server
# Start service # service named startredirecting to/bin/systemctl start named. Service # modify the configuration file. # Back up data before modification. This is a good habit # cp/etc/named. conf/etc/named. conf. bak # vi/etc/named. conf # suggestion: First annotate the original configuration and then write a new configuration, as shown in the following options {// listen-on port 53 {127.0.0.1 ;}; listen-on port 53 {Any ;}; # Change "yes" of DNSSEC to "no", for example: // DNSSEC-enable yes; DNSSEC-enable no; // DNSSEC-validation yes; DNSSEC-validation no; DNSSEC-lookaside auto; # modify allow-query to any, for example: // allow-query {localhost ;}; allow-query {Any ;}; allow-transfer {192.168.188.11; 192.168.188.12 ;};# set the secondary DNS address forwarders {202.102.224.68; 202.102.227.68 ;}; # configure the DNS forwarder }; // Add zonezone "bigcloud to leaus add. local "in {type master; file" bigcloud. zone ";}; // Add reverse zonezone" 0.0.10.in-ADDR. ARPA "in {# Here, the IP address changes the type master based on the network segment you have set; file" 10.0.0.zone ";}; # create a zone file # cd/var/named/# vi bigcloud. zone $ TTL 3h @ in SOA zzsrv1.bigcloud. local. rname. invalid. (0; Serial 1D; refresh 1 h; retry 1 W; expire 3 H); Minimum NS zzsrv1.bigcloud. local. zzsrv1 A 192.168.188.11zzsrv2 A 192.168.188.12ftp A 192.168.188.11mailsrv1 A 192.168.188.22www A 192.168.188.11crm A 192.168.188.11smtp cname mailsrv1.bigcloud. local. POP3 cname mailsrv1.bigcloud. local. # modify the reverse zone file of the preceding address as needed # vi192.168.188.zone $ TTL 3h @ insoa zzsrv1.bigcloud. local. tom_chen.126.com (0; Serial 1D; refresh 1 h; retry 1 W; expire 3 H); minimum in NS zzsrv1.bigcloud. local. in NS zzsrv2.bigcloud. local.11 in PTR zzsrv1.bigcloud. local.11 in ptr ftp. bigcloud. local.12 in PTR zzsrv2.bigcloud. local.12 in PTR mailsrv1.bigcloud. local. # Start the service # systemctlstart named. service # The first startup speed will be slow and set to Automatic startup # systemctlenable named |
Test
# nslookup> server192.168.188.11Default server: 192.168.188.11Address: 192.168.188.11#53>www.bigcloud.local.Server: 192.168.188.11Address: 192.168.188.11#53 Name: www.bigcloud.localAddress: 192.168.188.11>smtp.bigcloud.local.Server: 192.168.188.11Address: 192.168.188.11#53 smtp.bigcloud.local canonical name = mailsrv1.bigcloud.local.Name: mailsrv1.bigcloud.localAddress: 192.168.188.22>192.168.188.11Server: 192.168.188.11Address: 192.168.188.11#53 11.188.168.192.in-addr.arpa name = ftp.bigcloud.local.11.188.168.192.in-addr.arpa name = zzsrv1.bigcloud.local.> exit |
This article is from the "Li Hao" blog, please be sure to keep this source http://leaus.blog.51cto.com/9273485/1540310