We have completed most of the work before configuring static IP addresses, DNS settings, and host names in Linux. However, a small part of the work will be continued here. Continue with the article for configuration, soon you will complete a server host.
③ Configure the secondary DNS Server
Configure the server 11.0.0.2 as the 21php.com secondary dns Server
The secondary DNS Server transfers a complete set of domain information from the primary server. Zone files are transferred from the master server and stored as local disk files on the secondary server. The secondary server has a complete copy of the domain information, so you can also query the domain. The configuration content of this part is as follows:
Zone "21php.com" IN {
Type slave;
File "21php.com. zone ";
Masters {11.0.0.1 ;};
};
As you can see, unlike the primary DNS server, "type" is changed to "slave", and then the address "masters {11.0.0.1 ;};" of the primary DNS server is specified ;};". When the DNS service is started, it automatically connects 11.0.0.1, reads information about the 21php.com domain, and saves it to the 21php.com. zone file on the local machine.
④ Test the DNS server
After modifying the corresponding DNS file, run the "ndc restart" command to restart the service. In redhat 7.1 or a later version, run the following command:
/Etc/rc. d/init. d/named restart
Or
/Etc/rc. d/init. d/named reload
Make the change take effect.
To test DNS, you can find a client and set its DNS address to a new DNS server address. Then, try surfing the Internet, receiving emails, downloading emails, and so on. You can also run the nslookup command: Run nslookup, enter the host name to be queried, and check whether the correct IP address is returned. We recommend that you use the dig command in redhat 7.1 or later versions.
In this way, all configurations of Linux static IP configuration, DNS and host name are completed, and the server can run.
- How to Use the Linux rescue mode
- Describes the Problems and Solutions of Linux system calls.
- Ten common linux management errors
- How to configure access for different network segments in Linux
- Summary of Linux shortcut keys