Next: , Previous: , Up: Top   [Contents][Index]


5 Running Knot DNS

Knot DNS can run either in the foreground or in a background, with the -d option. When run in foreground, it doesn’t create a PID file. Other than that, there are no differences and you can control it just the same way.

Usage: knotd [parameters]

Parameters:
 -c, --config <file>    Select configuration file.
 -d, --daemonize=[dir]  Run server as a daemon. Working directory may
                        be set.
 -v, --verbose          Verbose mode - additional runtime information.
 -V, --version          Print version of the server.
 -h, --help             Print help and usage.

Use knotc tool for convenience when working with the server daemon. As of Knot DNS 1.3.0, the zones are not compiled anymore. That makes working with the server much more user friendly.

$ knotc -c knot.conf reload

The tool knotc is designed as a front-end for user, making it easier to control running server daemon. If you want to control the daemon directly, use SIGINT to quit the process or SIGHUP to reload configuration.

Usage: knotc [parameters] <action> [action_args]

Parameters:
 -c, --config <file>    Select configuration file.
 -s <server>            Remote UNIX socket/IP address (default
                        ${rundir}/knot.sock).
 -p <port>              Remote server port (only for IP).
 -y <[hmac:]name:key>   Use key specified on the command line
                        (default algorithm is hmac-md5).
 -k <file>              Use key file (as in config section 'keys').
 -f, --force            Force operation - override some checks.
 -v, --verbose          Verbose mode - additional runtime information.
 -V, --version          Print knot server version.
 -i, --interactive      Interactive mode (do not daemonize).
 -h, --help             Print help and usage.

Actions:
 stop                   Stop server.
 reload                 Reload configuration and changed zones.
 refresh [zone]         Refresh slave zone (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 current server configuration.
 checkzone [zone]       Check zone (all if not specified).
 memstats [zone]        Estimate memory consumption for zone (all if not
                        specified).

Also, the server needs to create several files in order to run properly. These files are stored in the folowing directories.

storage (see storage):

rundir (see rundir):


Next: , Previous: , Up: Top   [Contents][Index]