In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you about how to create an enterprise website Solaris environment DNS server. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.
1) several required configuration files:
Named.conf
Named.ca
Named.local
Master file (zone file in bind4)-nanjing.org.cn and nanjing.org.cn.rev are used in this article.
Of these configuration files, the most important is named.conf, which is the default startup file for named startup under / etc. A typical named.conf file includes at least options and zone, such as:
* * / / named.conf file content *
Options {
Directory "/ var/named"; / / the location of the database file, to create the named directory
Multiple-cnames yes
Pid-file "/ etc/named.pid"
}
/ / type domin source host/file backup file
Zone "." In {
Type hint; / / where hint is represented as a cache server
File "named.ca"
}
Zone "0.0.127.in-addr.arpa" in {
Type master; / / where master represents the primary dns server
File "named.local"
}
Zone "nanjing.org.cn" in {
Type master
File "nanjing.org.cn"; / / the nanjing.org.cn here is the domain you want to create, forward parsing
}
Zone "107.155.61.in-addr.arpa" in {
Type master
File "nanjing.org.cn.rev"; / / reverse resolution, domain is 107.155.61
}
Here, options defines the path where the master file is stored. Corresponding to a certain domain, named will look for the data file here. If there is a require request for www.nanjing.org.cn, named will look for the file nanjing.org.cn under / var/named and find out the ip of www.nanjing.org.cn. Zone defines a domain, such as nanjing.org.cn, type defines the type of domain name server, master indicates that this is a primary domain name server, and the first zone defines the local server as the master server of its own echo domain, mapping the address 127.0.0.1 to localhost, which can be seen in almost all types of domain name servers. The second zone is used to define a cache initialization file that contains at least the name and address of the root server (these root servers will also change) in the named.ca. Generally speaking, named.ca does not need to be modified, but only the fields and contacts in the SOA record need to be modified in named.local. File defines the master file of the domain nanjing.org.cn.
Create the following databases in the / var/named directory and the corresponding files named.ca,named.local,nanjing.org.cn and nanjing.org.cn.rev in the / etc/named.conf file.
* * / / nanjing.org.cn file content *
@ IN SOA dns.nanjing.org.cn.
Root.dns.nanjing.org.cn. (
2000120101; Serial Number
10800; Refresh after 3 hours
3600; Retry after 1 hour
3600000; Expire after 6 weeks
86400); Minimum TTL of 1 day
IN NS dns
@ IN MX 10 mail
Localhost IN A 127.0.0.1
Www IN A 61.155.107.131
Dns IN A 61.155.107.131
Mail IN A 61.155.107.132
Ftp IN CNAME dns
The @ defines the current domain, that is, the nanjing.org.cn., IN definition, which is a record of type inter-net, SOA (start of management) marks the beginning of an authorized domain, dns.nanjing.org.cn. To create a server for this domain, you can use the main domain name server, root.dns.nanjing.org.cn. Define the contact, after root. This is the @ in email, and the numbers in parentheses define several parameters related to this domain in seconds. The first four parameters are used to update master file by the secondary domain name server, where As explained later, serial number is used by the secondary domain name server to determine whether the master file of the primary domain name server is updated, so if you have a secondary domain name server, you should change the serial number every time you modify the master file so that the secondary domain name server updates the master file of the domain. Refresh defines the refresh time of the secondary domain name server, retry defines the interval between retries of the secondary server if the primary server does not respond, and expire defines the expiration time of the domain, that is, if the secondary server does not get the domain information from the primary server for 42 consecutive days, the secondary server discards the domain. The fifth parameter defines the validity period of the domain in the cache of other domain name servers, after which other domain name servers will come here to re-query the relevant information.
DNS indicates that the domain name server for this domain is dns.nanjing.org.cn. There can be multiple NS records
@ IN MX 10 mail indicates that all messages sent to the current domain are forwarded to the server mail.
The four A records Localhost, www, dns and mail mean parsing localhost to 127.0.0.1, www.nanjing.org.cn and dns.nanjing.org.cn to 61.155.107.131, and mail.nanjing.org.cn to 61.155.107.132, defining the alias of ftp as dns.
* * / / nanjing.org.cn.rev file content *
This file stores the mapping information from IP address to domain name. The contents of the file are as follows:
-
@ IN SOA dns.nanjing.org.cn.
Root.dns.nanjing.org.cn. (
2000120101; Serial
10800; Refresh
1800; Retry
3600000; Expire
86400); Minimum
IN NS dns.nanjing.org.cn.
131 IN PTR dns.nanjing.org.cn.
132 IN PTR mail.nanjing.org.cn.
Syntax description:
131 IN PTR dns.nanjing.org.cn.
The domain name of the server with address 131 in the current domain (i.e. 61.155.107) is dns.nanjing.org.cn.
132 meaning is the same as above, the domain name of the server is mail.nanjing.org.cn.
Note that the domain name of the server should be an absolute domain name.
* * / / named.ca file content *
; This file holds the information on root name servers needed to
; initialize cache of Internet domain name servers
(e.g. Reference this file in the "cache."
; configuration file of BIND domain name servers.
; This file is made available by InterNIC registration services
; under anonymous FTP as
; file / domain/named.root
; on server FTP.RS.INTERNIC.NET
;-OR- under Gopher at RS.INTERNIC.NET
; under menu InterNIC Registration Services (NSI)
; submenu InterNIC Registration Archives
; file named.root
; last update: Aug 22, 2000
; related version of root zone: 2000082200
; formerly NS.INTERNIC.NET
. 3600000 IN NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
; formerly NS1.ISI.EDU
. 3600000 NS B.ROOT-SERVERS.NET.
; formerly NS1.ISI.EDU
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107
; formerly C.PSI.NET
. 3600000 NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
; formerly TERP.UMD.EDU
. 3600000 NS D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
; formerly NS.NASA.ORG
,. 3600000 NS E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
; formerly NS.ISC.ORG
. 3600000 NS F.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
; formerly NS.NIC.DDN.MIL
. 3600000 NS G.ROOT-SERVERS.NET.
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
; formerly AOS.ARL.ARMY.MIL
. 3600000 NS H.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
Note: named.ca files generally do not need to be modified.
* * / / named.local file content *
; SOA rec
@ IN SOA dns.nanjing.org.cn. Root.nanjing.org.cn. (
2000120101; serial number
10800; refresh every 3 hours
10800; retry every 3 hours
604800; expire after a week
86400; TTL of 1 day
)
; Name Servers
IN NS dns.nanjing.org.cn.
; ip mappings
1 IN PTR localhost.nanjing.org.cn.
Note: this article only defines the domain name of the server whose IP address is 127.0.0.1: localhost.
At this point, a basic primary domain name server is established. But it needs to be noted that in master file, dns.nanjing.org.cn. The one in the back. This. This means that this is a complete record, otherwise the server will automatically add the current domain to you, for example: www represents www.nanjing.org.cn, and www.nanjing.org.cn will become www.nanjing.org.cn.nanjing.org.cn, the correct representation can be www or www.nanjing.org.cn. If you don't give this. If you pay enough attention to it, it is easy to make mistakes.
The above is the editor for you to share how to create an enterprise website Solaris environment DNS server, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.