Installing the Configure DNS server
Install a bind, first search.
Yum List |grep bind
bind.x86_64 we install this
Installation
Yum Install Bind.x86_64-y
Look at his configuration file.
Vim/etc/named.conf
{
Listen-on Port 53 {127.0.0.1;}; The listening port is 53, the IP that defines the listening 53 port is the 127.0.0.1 loopback IP
Listen-on-v6 Port 53 {:: 1;}; IP V6.
Directory "/var/named"; Directory for child configuration files
File "Data/named.run"; Error log file
. is the root domain
File "named.ca"; The root domain file specifies where the server is,
Take a look at the other configuration files
CAT/var/named/named.localhost
Domain corresponding to localhost
A record 127.0.0.1 can also be obtained by/etc/host query
$TTL 1D is a 1-day life cycle that loses contact with the Lord and expires after a day.
@ domain name: localhost. Records for SOA-authorized servers: @ localhost hostname ... Rname.invalid. Administrator's mailbox
0; Serial serial Number
1D Refresh, refresh from every interval,
1H; Retry different from the main, retry, time 1 hours
1W ; expire expiration time, 1 weeks
3H) minimum if TTL 1D is not defined, press 3H to execute
NS @ NS record is localhost
A 127.0.0.1 a record should be preceded by a string such as: 123.localhost if it's empty.
AAA:: 1 ipv6
Start the DNS server
/etc/init.d/named start
Test, and can be followed by other DNS such as 8.8.8.8
Dig @127.0. 0.1 localhost
Inverse parsing
CAT/var/named/named.loopback
One more line at the bottom.
PTR localhost This is the inverse parsing
Test
Dig @127.0. 0.1 -x 127.0. 0.1
Deploying and Tuning 3.1 DNS installation configuration-1