RHEL6 server build DNS Server

Source: Internet
Author: User
Tags nslookup
DNSdomainnamesystem Domain Name System features: (1) recursive query and iterative query (2) Distributed Database (3) Resolve domain names to IP addresses (4) it has three types: primary DNS server, secondary DNS server, and cache DNS server (5) 13 Global root domain servers 1. Software Package bind. i386 -- main service software package bind-chroot.i386 -- cage environment software package bind-devel.i386 -- Development Kit bind-libs.i386

DNS domain name system
Features: (1) recursive query and iterative Query
(2) Distributed Database
(3) Resolve the domain name to an IP address
(4) three types of DNS are available: primary DNS server, secondary DNS server, and cache DNS server.
(5) 13 Global root domain servers


1. Software Package
Bind. i386 -- main service package
Bind-chroot.i386-cage environment Software Package
Bind-devel.i386-Development Kit
Bind-libs.i386-library files
Bind-utils.i386-Toolkit
[Root @ rootbug ~] # Rpm-qa | package under grep ^ bind--- rhel6.3
Bind-utils-9.8.2-0.10.rc1.el6.x86_64
Bind-chroot-9.8.2-0.10.rc1.el6.x86_64
Bind-libs-9.8.2-0.10.rc1.el6.x86_64
Bind-9.8.2-0.10.rc1.el6.x86_64
Bind-dyndb-ldap-1.1.0-0.9.b1.el6.x86_64
------------- Why is the software package tangled ?? Because the names of these software packages have a relationship with each half of the three DNS words ---------


2. install the software package
[Root @ rootbug ~] # Yum install bind *-y


3. view the configuration file
In RHEL6, whether bind-chroot is installed or not, the configuration files are mainly/var/named. conf files.
(1) Modify/etc/named. conf
[Root @ rootbug ~] # Vim/etc/named. conf
------- Omit other 10 million lines of code ----------------

Options {
Listen-on port 53 {any ;}; -- change 127.0.0.1 in the original configuration file to any, which indicates listening to all
Listen-on-v6 port 53 {: 1 ;};
Directory "/var/named"; -- directory for storing domain data files
Dump-file "/var/named/data/cache_dump.db ";
Statistics-file "/var/named/data/named_stats.txt ";
Memstatistics-file "/var/named/data/named_mem_stats.txt ";
Allow-query {any;}; -- change the localhost of the configuration file to any, which indicates that everyone can query this server.
Recursion yes;

------- Omit other 10 million lines of code ----------------
Save the modification and exit.
(2) Configure/etc/named. rfc1912.zones and add the domain configuration.
[Root @ rootbug ~] # Vim/etc/named. rfc1912.zones
Add a Domain According to the configuration file format. Here I add a rootbug.com domain. The data file of the domain is placed under the data under the directory "/var/named", and the name is master.rootbug.com. zone. Pay attention to the semicolon ";" When configuring the domain.
Zone "rootbug.com" IN {
Type master;
File "data/master.rootbug.com. zone ";
};


Save and exit after configuration.


(3) create a data file for master.rootbug.com. zone.
[Root @ rootbug ~] # Vim/var/named/data/master.cluster.com. zone


$ TTL 3600
@ In soa rootbug. zhangsan .(
2013090801 -- version number. The following figure shows the synchronization time of the master-slave DNS server.
30
60
90
3600)
In ns 172.16.2.151. -- Here is the IP address of the DNS server (actually it should be a public IP address, but it is an Intranet environment, so the Intranet IP address is written), but there is a ". "Remember to add some, you can also write the Internet domain name of the DNS server; and here you can write multiple NS, representing multiple DNS servers in your company.
Mail in a 1.1.1.1 -- the record is the real data. Here, the public IP address of mail.rootbug.com is 1.1.1.1.
Dns in a 172.16.2.151
Bbs in a 2.2.2.2

 

Save and exit


(4) Start the DNS server
[Root @ rootbug ~] #/Etc/init. d/named start ---- it takes some time to start the first configuration.


(5) Whether the client authenticates the DNS server correctly
Windows Client Authentication
Enter 172.16.2.151 in the IP Address Configuration DNS column.
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C: \ Documents ents and Settings \ ruutbug> nslookup mail.rootbug.com
* ** Can't find server name for address 172.16.2.151: Server failed
* ** Default servers are not available
Server: UnKnown
Address: 172.16.2.151

Name: mail.rootbug.com
Address: 1.1.1.1


C: \ Documents ents and Settings \ ruutbug> nslookup dns.rootbug.com
* ** Can't find server name for address 172.16.2.151: Server failed
* ** Default servers are not available
Server: UnKnown
Address: 172.16.2.151

Name: dns.rootbug.com
Address: 172.16.2.151


C: \ Documents ents and Settings \ ruutbug> nslookup bbs.rootbug.com
* ** Can't find server name for address 172.16.2.151: Server failed
* ** Default servers are not available
Server: UnKnown
Address: 172.16.2.151

Name: bbs.rootbug.com
Address: 2.2.2.2

 

Recommended reading:

RHCE-certified RHEL6 system installation, installation of VM Tools and configuration of YUM local source http://www.linuxidc.com/Linux/2013-10/91214.htm

Install and configure http://www.linuxidc.com/Linux/2013-10/91139.htm for Nagios under RHEL6

Ganglia installation configuration http://www.linuxidc.com/Linux/2013-10/91138.htm under RHEL6

RHEL6.4 changed to CentOS source http://www.linuxidc.com/Linux/2013-10/90932.htm

RHEL6 platform rpm installation MySQL database http://www.linuxidc.com/Linux/2013-09/90435.htm

RHEL6.4 configure the source http://www.linuxidc.com/Linux/2013-09/90192.htm for local yum

Introduction to RHEL6 server time task http://www.linuxidc.com/Linux/2013-09/89820.htm

Related Article

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.