directory specified here is the directory where the zone file is stored, and if the file zone file is not stored in this directory, you will be prompted to find the file when it is started.Allow-query-cache {any;};Pid-file "Named.pid";};Key "Rndc-key" {Algorithm HMAC-MD5;Secret "+qe+rqths2/dda4xrhgzjq==";};Controls {inet 127.0.0.1 Port 953//define Local listening portsAllow {127.0.0.1;} keys {"Rndc-key";};
This article references a post under Cu. Thanks :)
1. Download bind
Http://ftp.isc.org/isc/bind9/9.4.3/BIND9.4.3.zip
2. InstallationDownload the zip package and double-click bindinstall.exe to install it. The default installation path is c: \ windows \ system32 \ DNS. Bind registers itself as a service under Win32. The service name is isc bind,ProgramThe name is named.exe. A private account is required to start the service. The default name is named. The password is customized by the in
For more information, see "Linux Enterprise Application-Linux server application. The following are my steps to install DNSbind. I don't know where something went wrong. Thank you very much for your advice!
1. Download, compile, and install (no problems occurred)
2. Configure the named. conf file. Set sysconfdir to/etc.
Only the root server directory is configured as follows:
Options {
Directory "var/named ";
};
Zone "."{
Type hint;
File "named, ca ";
};
Both semicolons and spaces a
.
--without-openssl: If you do not want to install OpenSSL, you need to use this parameter.
After loading, in order to start the convenience and security (in fact, to start the convenience), we'd better give bind to build a user, and then get a startup script.To create a bind user:-G bind-d/usr/local/sbin bindNote that the-D here is the user home directory. We are here the default installation of bind,named and RNDC are installed in/usr/local
Tags: secondary work controller text master-slave DNS use clear LIS OpenRNDC Related knowledge:1. What is RNDC:Remote Name Domain controllerRNDC communicates with the name server via a TCP connection and sends a digitally signed command. In the current version of RNDC and named, the only supported authentication algorithm is HMAC-MD5, which uses shared keys on both ends of the connection. It provides the TSIG type of authentication for the command req
compile and install
#/Usr/local/named/sbin/rndc-confgen>/usr/local/named/etc/rndc. conf generate the key file of the rndc control command
# Tail-10/usr/local/named/etc/rndc. conf | head-9 | sed s/# \ // g>/usr/local/named/etc/named. conf from rndc. extract named. key used b
Network)
2. Create databases and tables and add basic records# Zone sample.com
The method for adding other domain names is similar. Replace the zone item with the corresponding domain name.
3. bind compilation and installation and configuration
By default, the rpm package does not support the dlz mode and requires source code compilation.
Or
The following installation path is the default system path
Configuration file/etc/named. conf
Other configuration file paths:/etc/named/
4. Create re
In the previous article we built a master-slave DNS, but in the actual application, only build up is not enough, the DNS to add a variety of records is the daily maintenance of DNS more common problems, such as the addition of a records, cname,mx,ptr and so on.Add a recordIn the master-slave configuration, the primary DNS is typically modified to synchronize the primary DNS data from DNS.Edit the Zone profile of the master node to add a row of records directly at the end, with the serial value +
recursive function. In the test, the default configuration is used first, and restrictions must be imposed in actual use.
Check the syntax of the configuration file after the configuration file is modified: # named-checkconf
Start Service: # service named start. rndc is generated when the service is started for the first time. key file. In this process, the random number in the entropy pool is used. If the random number is not enough, the generated k
the logs. Bind service through/var/log/messages error, you can use the tail command to view the real-time error log, you must use the-F option: $ tail-f/var/log/messages.Therefore, when you write a domain file or modify/etc/named.config and restart the service, you can easily identify the type of error from the log after the error is displayed.Host CommandAfter you have successfully added or modified a record, you can use the host command to see if the host resolves correctly.The host command a
2, create a new configuration file, in which to edit their own required functionality
# vim/etc/named.conf
Options {directory "/var/named"; # defines the stored directory allow-recursion {172.16.0.0/16;};
# define the network segment to be recursive; Zone "." {type hint; # region type file ' named.ca ';
# zone data File};
Zone "localhost" {type master;
File "Named.localhost"; Allow-transfer {none;};
# do not allow zone trans
MySQL STARTUP script based on your MySQL installation location ):
vi /usr/local/mysql/bin/mysqld_safe
In the next line of # executingmysqld_safe, add:
export LD_PRELOAD=/usr/local/lib/libtcmalloc.so
Save and exit, and then restart the MySQL service.
4. Run the lsof command to check whether tcmalloc is effective:
lsof -n | grep tcmalloc
If the following information appears, tcmalloc has taken effect:
mysqld 10847 mysql mem REG 8,5 1203756 20484960/usr/local/lib/libtcmalloc.so.0.0.0
After complet
From the setup of the DNS serverThe previous article has a schema procedure that says "Primary DNS server", and now, from the server's schema step, the IP address and server name of the master-slave DNS server are unchanged.Basically, the settings from the server are simple, because the master server's data has been done, from the server only need to do a good link, and then verify that the data can be read from the primary server.The ip:172.16.100.1 of the primary server, called DNS, is ip:172.
1. Clear DNS cache in Linux
There are two methods to implement DNS caching in Linux:One is to use DNS CacheProgramNscd (Name Service cache Daemon) is responsible for managing DNS cache.One way to implement DNS caching is to use bind to set up the caching name server.
To clear the cache on nscd, restart the nscd service to clear the DNS cache. Run the following command:# Service nscd restartOr#/Etc/init. d/nscd restart
To clear the cache on the BIND server, run the following command:#
One: Network environmentbind9.4Host name (hostname): CentOSip:192.168.1.168dns:192.168.1.1 (after configuration, you need to modify, point to 192.168.1.168, modify the/etc/resolv.conf),
Purpose to achieve: Configure this host as a DNS serverDNS server:ns1.test.comip:192.168.1.168Www.test.com 192.168.1.168
Two: Installation process
The installed directory is/usr/local/named, all the domain name files are placed under the/usr/local/named/var, this path needs attention, many articles are in/var/
serious.
24 .... I'm 42 now!!!I was just about to take a look at Java ... Are you all right?
24-year-old think things more long-term, sometimes feel very contradictory, slowly adjust the mentality.
Mind leveling down, concentrating on research to mastery
Change the working environment, personally think that do web development spend a bit of effort on the database and server
With LZ empathy, used to work in the network company, often time tight, more tasks, especially when a function does n
serious.
24 .... I'm 42 now!!!I was just about to take a look at Java ... Are you all right?
24-year-old think things more long-term, sometimes feel very contradictory, slowly adjust the mentality.
Mind leveling down, concentrating on research to mastery
Change the working environment, personally think that do web development spend a bit of effort on the database and server
With LZ empathy, used to work in the network company, often time tight, more tasks, especially when a function does n
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.