Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

13.3 Deploy from the server


May 24, 2021 That's what Linux should learn



As an important Internet infrastructure service, it is very important to ensure the normal operation of DNS domain name resolution service, which can provide stable, fast and uninterrupted domain name query service. In DNS domain name resolution service, the server can obtain the specified zone data file from the primary server, thus playing the role of backup resolution records and load balancing, so the deployment from the server can reduce the load pressure on the primary server, but also improve the user's query efficiency.

In this experiment, the operating system and IP addresses used by the primary server and the from the server are shown in Table 13-2.

Table 13-2 Operating system and IP address information used by the primary server and the server respectively

Host Name Operating System IP Address Primary Server RHEL 7 192.168.10.10 From Server RHEL 7 192.168.10.20 Step 1: Allow the update request from the server in the zone profile of the primary server, i.e. modify the host address of alllow-update to allow updates to zone information; } ; parameter, and then restart the DNS service program for the primary server.

[root@linuxprobe ~]# vim /etc/named.rfc1912.zones zone "linuxprobe.com" IN { type master; f ile "linuxprobe.com.zone"; a llow-update { 192.168.10.20; } ; } ; z one "10.168.192.in-addr.arpa" IN { type master; f ile "192.168.10.arpa"; a llow-update { 192.168.10.20; } ; } ; S tep root@linuxprobe 2nd step: Fill in the IP address of the primary server with the area information you want to crawl from the server, and then restart the service. N ote that the service type at this point should be slave (from) and not master (master). The masters parameter should be followed by the IP address of the primary server, and the file parameter is defined after the location to be saved after the data profile is synchronized, and you can see the synchronized files later in the directory.

[root@linuxprobe ~]# vim /etc/named.rfc1912.zones zone "linuxprobe.com" IN { type slave; m asters { 192.168.10.10; } ; f ile "slaves/linuxprobe.com.zone"; } ; z one "10.168.192.in-addr.arpa" IN { type slave; m asters { 192.168.10.10; } ; f ile "slaves/192.168.10.arpa"; } ; S tep root@linuxprobe 3: Test the results of the analysis. W hen the DNS service program from the server restarts, the data profile is automatically synchronized from the primary server, and the file is placed in the directory location defined in the zone profile by default. T he network parameters from the server are then modified to 192.168.10.20, so that the DNS domain name resolution service provided from the server itself can be used. Finally, you can use the nslookup command to see the resolution results smoothly.

[root@linuxprobe ~]# cd /var/named/slaves [root@linuxprobe slaves]# ls 192.168.10.arpa linuxprobe.com.zone [root@linuxprobe slaves]# nslookup

www.linuxprobe.com Server: 192.168.10.20 Address: 192.168.10.20#53 Name: www.linuxprobe.com Address: 192.168.10.10 192.168.10.10 Server: 192.168.10.20 Address: 192.168.10.20#53 10.10.168.192.in-addr.arpa name = www.linuxprobe.com. 1 0.10.168.192.in-addr.arpa name = ns.linuxprobe.com. 10.10.168.192.in-addr.arpa name = mail.linuxprobe.com.