[Linux] install DNS domain name resolution service
In Linux, DNS is implemented using bind.
Hardware and Configuration:
Procedure
Install the bind command: yum-y install bind-utils bind-chroot
Run the command "vim/etc/named. conf" to modify the access permission.
Modify the/etc/named. rfc1912.zones file and add the correct and reverse configuration command: vim/etc/named. rfc1912.zones
Resolution: zone "ftgov" IN {// type master is being resolved when the input is similar to "ftgov" suffix such as hadoop01.ftgov; // This is the dns host file "named.ftgov.com "; // The resolution file will read the domain name and IP ing configuration of the named.ftgov.com file in the/var/named directory (generated later) allow-update {none ;};}; zone "60.190.10.in-addr. arpa "IN {// anti-resolution when the input is similar to" 10.190.60.xxx ". Pay attention to the Address Sequence type master; file" named.10.190.60.zone "; // The Reverse file is located in the configuration of named.10.190.60.zone in the/var/named directory (generated later) allow-update {none ;};};
Generate the forward and reverse file required for the above Configuration
Open the directory cd/var/named
Generate file named.ftgov.com
Configure named.ftgov.com
Generate file named.10.190.60.zone
Configuration
Configure other DNS clients 1. First Use ifconfig to check which Nic is used by the current client, such as my host: eth1 Nic
2. Modify the file vim/etc/sysconfig/network-scripts/ifcfg-eth1 // specifically change to the last line of your current Nic name plus a line of DNS host IP 3. Restart the client network SERVICE
Command: service network restart 4. other clients perform the same operation
Start DNS server startup command: service named start check whether the service is normal: tail-n 30/var/log/messages | grep named
Result of the DNS service test: