bind9 ubuntu启动和关闭

前端之家收集整理的这篇文章主要介绍了bind9 ubuntu启动和关闭前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


Debian / Ubuntu Linux

Type the following command to start BIND server:
# service bind9 start
Type the following command to stop BIND server:
# service bind9 stop
Type the following command to restart BIND server:
# service bind9 restart
Type the following command to reload BIND server to reload zone file or config file changes:
# service bind9 reload
Type the following command to see the current status of BIND server:
# service bind9 status
Sample outputs:

Fig.01: BIND 9 Service In Action


You can also use the following Syntax too:
/etc/init.d/bind9 start
/etc/init.d/bind9 stop
/etc/init.d/bind9 restart
/etc/init.d/bind9 status

A note about rncd command

This is an optional command and you are recommended to use the above commands only. From the rndc man page:

rndc controls the operation of a name server. It supersedes the ndc utility that was provided in old BIND releases. If rndc is invoked with no command line options or arguments,it prints a short summary of the supported commands and the available options and their arguments. rndc communicates with the name server over a TCP connection,sending commands authenticated with digital signatures. In the current versions of rndc and named,the only supported authentication algorithm is HMAC-MD5,which uses a shared secret on each end of the connection. This provides TSIG-style authentication for the command request and the name server’s response. All commands sent over the channel must be signed by a key_id known to the server. rndc reads a configuration file to determine how to contact the name server and decide what algorithm and key it should use.

Please note that rndc does not yet support all the commands of the BIND 8 ndc utility:

  1. status – Display status of the server.
  2. stop – Save pending updates to master files and stop the server.
  3. restart – Restart the server.
  4. reload – Reload configuration file and zones.

To see status,enter:
# rndc status
Sample outputs:

version: 9.7.3
cpus found: 8
worker threads: 8
number of zones: 18
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running

To reload the server,enter:
# rndc reload
To see all options just type rncd:
# rndc
Sample outputs:

Usage: rndc [-b address] [-c config] [-s server] [-p port]
	[-k key-file ] [-y key] [-V] command

command is one of the following:

  reload	Reload configuration file and zones.
  reload zone [class [view]]
		Reload a single zone.
  refresh zone [class [view]]
		Schedule immediate maintenance for a zone.
  retransfer zone [class [view]]
		Retransfer a single zone without checking serial number.
  freeze	Suspend updates to all dynamic zones.
  freeze zone [class [view]]
		Suspend updates to a dynamic zone.
  thaw		Enable updates to all dynamic zones and reload them.
  thaw zone [class [view]]
		Enable updates to a frozen dynamic zone and reload it.
  notify zone [class [view]]
		Resend NOTIFY messages for the zone.
  reconfig	Reload configuration file and new zones only.
  sign zone [class [view]]
		Update zone keys,and sign as needed.
  loadkeys zone [class [view]]
		Update keys without signing immediately.
  stats		Write server statistics to the statistics file.
  querylog	Toggle query logging.
  dumpdb [-all|-cache|-zones] [view ...]
		Dump cache(s) to the dump file (named_dump.db).
  secroots [view ...]
		Write security roots to the secroots file.
  stop		Save pending updates to master files and stop the server.
  stop -p	Save pending updates to master files and stop the server
		reporting process id.
  halt		Stop the server without saving pending updates.
  halt -p	Stop the server without saving pending updates reporting
		process id.
  trace		Increment debugging level by one.
  trace level	Change the debugging level.
  notrace	Set debugging level to 0.
  flush 	Flushes all of the server's caches.
  flush [view]	Flushes the server's cache for a view.
  flushname name [view]
		Flush the given name from the server's cache(s)
  status	Display status of the server.
  recursing	Dump the queries that are currently recursing (named.recursing)
  validation newstate [view]
		Enable / disable DNSSEC validation.
  *restart	Restart the server.
  addzone ["file"] zone [class [view]] { zone-options }
		Add zone to given view. Requires new-zone-file option.
  delzone ["file"] zone [class [view]]
		Removes zone from given view. Requires new-zone-file option.

* == not yet implemented
Version: 9.7.3


REF

https://www.cyberciti.biz/faq/start-stop-restart-bind9-linux-command/

原文链接:https://www.f2er.com/ubuntu/353637.html

猜你在找的Ubuntu相关文章