diff options
Diffstat (limited to 'doc/running.texi')
-rw-r--r-- | doc/running.texi | 74 |
1 files changed, 33 insertions, 41 deletions
diff --git a/doc/running.texi b/doc/running.texi index 628cd7d..bee48f3 100644 --- a/doc/running.texi +++ b/doc/running.texi @@ -13,49 +13,45 @@ effort, so each time the zone file changes you need to compile it. @example $ knotc -c knot.conf compile @end example -Or alternatively, you can compile automatically using the @code{-a} flag. +Knot DNS automatically compiles zones on some actions (@code{start|restart}). @example -$ knotc -a -c knot.conf start|reload|restart +$ knotc -c knot.conf start|reload|restart @end example The tool @code{knotc} is designed as a front-end for user, making it easier to do everything from zone compilation to controlling the server daemon. -To communicate with the binary, it reads the PID from the @emph{PID file} specified in the configuration @code{pidfile} and sends POSIX signals to it (@pxref{pidfile}). -If you want to control the daemon directly, use @code{SIGINT} to quit the process or @code{SIGHUP} to reload configuration. Signal @code{SIGUSR2} is currently used to refresh slave zones. +If you want to control the daemon directly, use @code{SIGINT} to quit the process or @code{SIGHUP} to reload configuration. @example -Usage: knotc [parameters] start|stop|restart|reload|running|compile +Usage: knotc [parameters] <action> [action_args] + Parameters: - -c [file], --config=[file] - Select configuration file. - -j [num], --jobs=[num] - Number of parallel tasks to run when compiling. - -f, --force - Force operation - override some checks. - -v, --verbose - Verbose mode - additional runtime information. - -V, --version - Print knot server version. - -w, --wait - Wait for the server to finish start/stop operations. - -i, --interactive - Interactive mode (do not daemonize). - -a, --auto - Enable automatic recompilation (start or reload). - -h, --help - Print help and usage. + -c [file], --config=[file] Select configuration file. + -j [num], --jobs=[num] Number of parallel tasks to run when compiling. + -s [server] Remote server address (default 127.0.0.1) + -p [port] Remote server port (default 5553) + -y [hmac:]name:key] Use key_id specified on the command line. + -k [file] Use key file (as in config section 'keys'). + f.e. echo "knotc-key hmac-md5 Wg==" > knotc.key + -f, --force Force operation - override some checks. + -v, --verbose Verbose mode - additional runtime information. + -V, --version Print knot server version. + -w, --wait Wait for the server to finish start/stop operations. + -i, --interactive Interactive mode (do not daemonize). + -h, --help Print help and usage. Actions: - start Start knot server zone (no-op if running). - stop Stop knot server (no-op if not running). - restart Stops and then starts knot server. - reload Reload knot configuration and compiled zones. - refresh Refresh all slave zones. - running Check if server is running. - checkconf Check server configuration. - checkzone Check zones (accepts specific zones, - e.g. 'knotc checkzone example1.com example2.com'). - compile Compile zones (accepts specific zones, see above). + start Start server (no-op if running). + stop Stop server (no-op if running). + restart Restarts server (no-op if running). + reload Reloads configuration and changed zones. + refresh Refresh slave zones (all if not specified). + flush Flush journal and update zone files. + status Check if server is running. + zonestatus Show status of configured zones. + checkconf Check server configuration. + checkzone Check specified zone files. + compile Compile zone files (all if not specified). @end example If you want to run Knot DNS daemon directly, you can use @code{knotd} binary @@ -129,7 +125,8 @@ When the server is running, you can control the daemon, see @ref{Controlling run @section Running a master server Knot DNS first needs to compile the zones before it can load them, therefore you need to -compile them with the @code{knotc compile} action or use flag @code{-a} to compile the zones automatically. +compile them with the @code{knotc compile} action. +Some actions like @code{start} or @code{restart} compile zones automatically. If you want to just check the zone files first before starting, you can use @code{knotc checkzone} action. @@ -146,7 +143,7 @@ $ knotc -w -c master.conf start Or you can compile it automatically: @example $ knotc -c master.conf checkconf # check configuration -$ knotc -a -w -c master.conf start +$ knotc -w -c master.conf start @end example @node Controlling running daemon @@ -162,12 +159,7 @@ $ knotc -c master.conf compile # compile updated zones $ knotc -c master.conf reload # reconfigure and load updated zones @end example -Or use the @code{-a} again. -@example -$ knotc -a -c master.conf reload # compile zones and reconfigure -@end example - -If you want @emph{IXFR-out} differences created from changes you make to a zone file, enable @code{ixfr-from-differences} +If you want @emph{IXFR-out} differences created from changes you make to a zone file, enable @ref{ixfr-from-differences} in @code{zones} statement, then compile the zone and reload your server as seen above. If @emph{SOA}'s @emph{serial} is not changed no differences will be created. Please note that this feature is in @emph{experimental} stage and should be used with care. |