[Linux] install DNS domain name resolution service, linuxdns domain name resolution

Source: Internet
Author: User

[Linux] install DNS domain name resolution service, linuxdns domain name resolution

  • In Linux, DNS is implemented using bind.
  • Hardware and Configuration:
Machine IP Address Machine name Purpose
10.190.60.5 Hadoop01.ftgov DNS host
10.190.60.6
Hadoop02.ftgov
DNS Client
10.190.60.7
Hadoop03.ftgov
DNS Client

Procedure
  • Install bind
Command: yum-y install bind-utils bind-chroot

  • Modify/etc/named. conf access permission
Command: vim/etc/named. conf
  • Modify the/etc/named. rfc1912.zones file and add the forward and reverse resolution configurations.
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 the DNS server
Run the command: service named start to check whether the service is normal: tail-n 30/var/log/messages | grep named
  • Test DNS Service
Positive result: reverse result:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.