In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "the method of installation and configuration of bind9 under linux". The editor shows you the operation process through the actual case. The method of operation is simple and fast, and it is practical. I hope that this article "method of installation and configuration of bind9 under linux" can help you solve the problem.
First, install bind
1. Download bind
two。 Compilation and installation
The copy code is as follows:
# tar zxvf bind-9.4.0.tar.gz
# cd bind-9.4.0
#. / configure sysconfdir=/etc / / more installation options. / configure-- help
# make
# make install
Second, configure bind
a. Create a required file
1). / etc/named.conf
# vi / etc/named.conf launch and save or touch / etc/named.conf
2). / etc/rndc.conf
# rndc-confgen > / etc/rndc.conf
b. Create a directory / var/named
# mkdir / var/named
b. Edit / etc/named.conf as follows
The copy code is as follows:
Options {
Directory "/ var/named"; / / indicates that the default database file is not created manually in / var/named.
/ / pid-file "/ var/run/named/named.pid"; / / the path to the running pid file, which is used to start named with another user
}
Zone "." {/ / create a root domain
Type hint
File "named.ca"
}
Zone "localhost" {/ / create localhost domain
Type master
File "named.local"
}
Zone "example.com" {/ / create example.com domain
Type master
File "example.com.zone"
}
Reverse Analysis of zone "0.0.127.in-addr.arpa" {/ / localhost
Type master
File "127.0.0.zone"
}
Reverse parsing of zone "100.168.192.in-addr.arpa" {/ / example.com
Type master
File "192.168.100.zone"
}
/ / this file needs to be copied at the end of / etc/rndc.conf to use # tail + 13 / etc/rndc.conf > > / etc/named.conf.
# use with the following in named.conf, adjusting the allow list as needed:
Key "rndc-key" {
Algorithm hmac-md5
Secret "hwm3l+e7lwdzjj/djezqew=="
}
Controls {
Inet 127.0.0.1 port 953
Allow {127.0.0.1;} keys {"rndc-key";}
}
# end of named.conf
d. Creating the corresponding data file name in / var/named is determined by the file parameter in named.conf
From named.conf, we know that there are named.ca, named.local, example.com.zone, 127.0.0.zone, 192.168.100.zone
1. Named.ca
# dig-t ns. > / var/named/named.ca
2. Named.local # vi / var/named/named.local add the following
The copy code is as follows:
$ttl 1d
@ in soa localhost. Root (
2007042801
1h
15m
1w
1D)
In ns @
In a 127.0.0.1
3. Example.com.zone
The copy code is as follows:
$ttl 1d
@ in soa example.com. Root (
2007042801
1h
15m
1w
1D)
In ns ns.example.com.
In mx 10 mail.example.com.
In a 192.168.100.125
Www in a 192.168.100.125
Db in a 192.168.100.124
Ns in a 192.168.100.126
Mail in a 192.168.100.251
Shop in a 192.168.100.125
* .shop in a 192.168.100.124
News in cname www
3. 127.0.0.zone
$ttl 1d
@ in soa @ root.localhost. (
2007042801
1h
15m
1w
1d
)
In ns localhost.
1 in ptr localhost.
4. 192.168.100.zone
$ttl 1d
@ in soa @ root.example.com. (
2007042801
1h
15m
1w
1D)
In ns example.com.
125 in ptr example.com.
125 in ptr www.example.com.
124 in ptr db.example.com.
126 in ptr ns.example.com.
251 in ptr mail.example.com.
Supplementary explanation
A. Startup problem of named server
1. Launch # named / / launch as root user
# named-u named / / is launched as a named user, which is required and that the owner of named.pid is named
two。 How to restart after changing the configuration
# rndc reload
3. Host, dig and nslookup can be used to determine whether the configuration is successful or not.
This is the end of the introduction on "how to install and configure bind9 under linux". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.