Some common knowledge of configuring DNS servers in Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. It is particularly important to use and configure DNS for how to implement Intranet and build Web servers or other servers on the enterprise Intranet. Next, we will discuss how to configure DNS in Linux.
In Linux, if the server installation mode is used, you can first select the DNS installation mode. After the installation is complete, run the service configuration command ntsysv to set the DNS service to be started when Linux is started.
The DNS service process is named. After starting, you can provide the DNS client with the domain name resolution service, convert the domain name to an IP address, and convert the IP address to a domain name.
1. Read/etc/named. boot at named startup, so/etc/named. boot is the basic configuration file of named. In/etc/named. boot, you can specify the forward domain name conversion data file, reverse DNS data file, top-level domain name server file, and backup DNS. An example of this file is as follows:
· Diretables/var/named
Specify named to read DNS data files from the/var/named directory.
· Primary qyweb.com dns. hosts
Specify dns as the primary domain name server for the qyweb.com domain. The dns. hosts file contains all domain name conversion data in the form of *. qyweb.com.
· Primary 0.0.127.IN-ADDR. ARPA dns. local
Specify dns as the master server for 127.0.0 CIDR Block conversion. The dns. local file contains the address-to-Domain Name conversion data in the format of 127.0.0.
· Primary 26.230.10.IN-ADDR. ARPA dns. rev
Specify dns as the master server for IP address translation of 10.230.26. The dns. rev file contains the conversion data of all IP addresses in the form of 10.230.26. * to the domain name.
· Cache db. cache
Specify dns to obtain the top-level "root" server address of the Internet from the db. cache file.
In the same directory as named. boot, there is a named. conf, which defines the domain name Retrieval Method of the DNS server. You can refer to named. boot for corresponding changes.
2. Forward domain name conversion data file dns. hosts includes all host nodes in qyweb.com.
@ In soa dns.qyweb.com manager.dns.qyweb.com.
(199511301
28800
7200
3600000
86400)
NS dns.qyweb.com.
MX 10 dns.qyweb.com.
Localhost A 127.0.0.1
Dns A 10.230.26.5
Www A 10.230.26.6; the ip address is the same as that of the dns server.
|-Page-|
Mail MX 7 dns.qyweb.com.; The host name must contain a "."
Ftp CNAME dns.qyweb.com.; The host name must contain a "."
SOA records define the basic information of domain name data.
The NS record and MX record define the Domain Name of the Domain Name Server and the name of the email server corresponding to the username @ qyweb.com email address.
A record is A record from the DNS domain name to the IP address and is required. Take dns.qyweb.com as an example. In the record, the domain qyweb.com is omitted and only written as ns. during processing, the named automatically adds qyweb.com according to the definition in named. boot, and its corresponding IP address is 10.230.26.5.
MX record is the mail address conversion record, this example defines the username @ mail.qyweb.com mail address to the username@dns.qyweb.com, that is, the real mail server is actually dns.qyweb.com, where dns.qyweb.com priority is 7, generally, emails are first sent to dns.qyweb.com, a host with a small priority.
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.