DNS named. conf parameter explanation and installation procedure Author: DNS named. conf Source: Unknown Release Date: 7:59:00
SOA indicates the authority of the Region
NS lists a name server in the region
A name-to-address ing
PTR address-to-name ing
Cname alias TTL value
The name server provides this TTL value in the query response, allowing other servers to store data in the cache at the time specified by TTL.
If your data does not change frequently or does not change much, you can set the TTL value to 1 day by default. 1 week is the maximum value.
Short values such as 1 hour can also be used, but we generally do not recommend short values. SOA record
Indicates that the name server is the best information source for the data in the region. According to this SOA record, our name server has the authority of Zone seker.com. Each data file must have an SOA record, and one or only one SOA record is allowed in each data file. Seker.com. There must be a vertex to end. This is because DNS has a short-term practice. If you do not add a value after seker.com, it will become the name of the Master name server in seker.com. Seker. comsoa. The second name is to manage the email address of the zone.
(You can change root. To root @, this is actually an email address.) ns record
The next entry we add to each file is NS, which specifies our authoritative DNS server in this region.
First download bind from http://www.isc.org/products/BIND/, I download bind-9.3.1rc1.tar.gz
RPM package
Bind-chroot-9.2.4-2
Bind-libs-9.2.4-2
Binary-9.2.4-2
Bind-devel-9.2.4-2
Bind-utils-9.2.4-16.EL4
Caching-nameserver-7.3-3
Put the downloaded file in the/root directory.
Decompress the Directory
[Root @ linux root] # tar xfz bind-9.3.1rc1.tar.gz
Enter the directory just extracted
[Root @ linux root] # cd bind-9.3.1rc1
Compile configuration
[Root @ Linux bind-9.3.1rc1] #./configure -- prefix =/usr/local/named -- enable-threads # -- enable-threads enable Multithreading
[Root @ bind-9.3.1rc1] # Make
[Root @ bind-9.3.1rc1] # make install
Go to/usr/local/named to create the etc directory.
[Root @ bind-9.3.1rc1] # cd/usr/local/named
[Root @ Linux named] # mkdir etc
Generate the key file of the rndc control command
[Root @ Linux named] # sbin/rndc-confgen> ETC/rndc. conf
Extract the key used by named. conf from the rndc. conf file
Root @ Linux named] # CD etc
[Root @ Linux etc] # tail-10 rndc. conf | head-9 | sed S/# // G> named. conf
The named and conf files are automatically generated in/usr/local/named/etc.
Create a partition file directory
[Root @ Linux etc] # mkdir/var/named
Enter/var/named
[Root @ Linux etc] # cd/var/named
Create a localhost. Zone File
[Root @ Linux named] # vi localhost. Zone
$ TTL 86400
$ Origin localhost.
@ 1D in SOA @ root (
42; Serial (D. Adams)
3 h; refresh
15 m; retry
1 W; expiry
1D); Minimum
1D in NS @
1D in a 127.0.0.1
Create a named. Local file
[Root @ Linux named] # vi named. Local
$ TTL 86400
@ In SOA localhost. Root. localhost .(
1997022700; Serial
28800; refresh
14400; retry
3600000; expire
86400); Minimum
In NS localhost.
1 In PTR localhost.
The Dig command directly generates the named. root file.
[Root @ Linux named] # Dig> named. Root
Create a forward resolution file for the seker.com Domain Name
[Root @ Linux named] # vi Seker. Zone
$ TTL 1d
@ In SOA seker.com. root.seker.com .(
1053891162
3 H
15 m
1 W
1D)
In NS seker.com.
In MX 5 seker.com.
WWW in a 192.168.1.4
Create seker.com domain name reverse resolution File
[Root @ Linux named] # vi Seker. Local
$ TTL 86400
@ In SOA seker.com. root.seker.com .(
20031001;
7200;
3600;
43200;
86400 );
@ In NS seker.com.
4 In PTR www.seker.com.
Add the following code to configure named. conf:
[Root @ Linux etc] # vi named. conf
Options {
Directory "/var/named"; # named file directory
PID-file "named. PID"; # process ID file name
};
Controls {
Inet 127.0.0.1 allow {localhost;} Keys {rndckey ;};
};
Zone "." In {
Type hint;
File "named. Root ";
};
Zone "localhost" in {
Type master;
File "localhost. Zone ";
Allow-update {none ;};
};
Zone "0.0.127.in-ADDR. Arpa" in {
Type master;
File "named. Local ";
Allow-update {none ;};
};
Zone "seker.com" in {
Type master;
File "Seker. Zone ";
Allow-update {none ;};
};
Zone "1.168.192.in-ADDR. Arpa" in {
Type master;
File "Seker. Local ";
Allow-update {none ;};
};
Now that the configuration is complete, BIND can be started.
/Usr/local/named/sbin/named-C/usr/local/named/etc/named. conf &
As long as the display
Runing indicates that the operation is successful.
Test DNS
[Root @ Linux etc] # host 192.168.1.4
4.1.168.192.in-ADDR. Arpa Domain Name Pointer dns.seker.com.
The above display indicates that dns reverse resolution is normal.
[Root @ Linux etc] # Ping www.seker.com
Ping www.seker.com (192.168.1.4) 56 (84) bytes of data.
The above display indicates normal forward resolution.
DNS configuration complete
FAQ:
Error: view. C: 347: require (& view-> references)-> refs> 0) failed
Rpm-e-nodeps bind-libs-9.2.4-2
Yum install bind-libs
Service named restart