Knot DNS - DNS autoritaire haute performance
Find a file
2011-11-02 14:58:23 +01:00
libknot Fix header files in the Makefile.am 2011-11-02 14:23:14 +01:00
m4 Added manpages rules to autoconf. 2011-11-02 12:18:20 +01:00
samples Configurable number of workers (entry system.workers). 2011-10-28 16:22:53 +02:00
scripts Added new test data. Added separate loading of queries. Changed python script to contain query flag. 2011-07-25 13:23:22 +02:00
src Fix header files in the Makefile.am 2011-11-02 14:23:14 +01:00
tests Fixed querytcp.c unexpected termination. 2011-06-22 19:55:03 +02:00
.gitattributes Add .gitattributes export-ignore 2011-11-02 14:58:23 +01:00
.gitignore Cleanup generated files and sources and add those items to .gitignore 2011-10-07 10:19:00 +02:00
AUTHORS Add Ondřej Filip to the AUTHORS file 2011-08-29 17:30:50 +02:00
ChangeLog First try at autotools 2011-02-25 15:26:15 +01:00
CodingStyle Fixed ifdef guards. 2011-08-10 15:01:20 +02:00
configure.ac Bump version and update the email 2011-11-02 14:25:38 +01:00
COPYING First try at autotools 2011-02-25 15:26:15 +01:00
Doxy.page.h Actualised Doxygen main page. 2011-06-23 12:46:54 +02:00
Doxyfile Improved documentation. 2011-04-05 12:10:45 +02:00
Doxyfile.devel Improved documentation. 2011-04-05 12:10:45 +02:00
INSTALL Merge remote branch 'origin/pollapi' into debug 2011-09-23 14:56:23 +02:00
Knot.config Added QtCreator project files 2011-02-28 11:19:59 +01:00
Knot.creator Added QtCreator project files 2011-02-28 11:19:59 +01:00
Knot.files Added API for TSIG generation and validation 2011-10-13 16:59:36 +02:00
Knot.includes Added QtCreator project files 2011-02-28 11:19:59 +01:00
knot.sample.conf.in Install changes. 2011-09-01 11:31:55 +02:00
KNOWN_ISSUES Removed TXT issue from known issues. 2011-09-02 16:14:58 +02:00
Makefile.am Autogenerate and install default configuration file 2011-09-01 10:34:48 +02:00
NEWS First try at autotools 2011-02-25 15:26:15 +01:00
README Updated README to reflect liburcu requirements on BSD/x86_64 2011-10-30 14:31:08 +01:00
resource.sh Code compatibility for OS X/BSD. 2011-08-01 17:05:59 +02:00

Installation
============

The following steps should work (verified in VirtualBox only)
on the distribution/architecture/release combinations as listed bellow.

----------------------------------------------
Debian         (AMD64, I386) 6.0.2.1 (squeeze)
Ubuntu Server  (AMD64, I386) 10.04 LTS
Ubuntu Desktop (AMD64, I386) 10.04 LTS
----------------------------------------------

$ # make the system up-to-date
$
$ sudo apt-get update
$ sudo apt-get upgrade
$
$ # ensure all prerequisites are installed
$
$ sudo apt-get install git-core autoconf libtool flex bison libssl-dev
$
$ # the required version of liburcu is not available in the default package sources.
$
$ wget http://bd.archive.ubuntu.com/ubuntu/pool/universe/libu/liburcu/liburcu0_0.5.4-1_amd64.deb
$ wget http://bd.archive.ubuntu.com/ubuntu/pool/universe/libu/liburcu/liburcu-dev_0.5.4-1_amd64.deb
$ sudo dpkg -i liburcu0_0.5.4-1_amd64.deb
$ sudo dpkg -i liburcu-dev_0.5.4-1_amd64.deb
$
$ # go for the real thing
$
$ git clone git://git.nic.cz/knot
$ cd knot
$ autoreconf -if
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig

Alternative packages for I386:

$ # the required version of liburcu is not available in the default package sources.
$
$ wget http://bd.archive.ubuntu.com/ubuntu/pool/universe/libu/liburcu/liburcu0_0.5.4-1_i386.deb
$ wget http://bd.archive.ubuntu.com/ubuntu/pool/universe/libu/liburcu/liburcu-dev_0.5.4-1_i386.deb
$ sudo dpkg -i liburcu0_0.5.4-1_i386.deb
$ sudo dpkg -i liburcu-dev_0.5.4-1_i386.deb

Installation on BSD
===================

Not all prerequisites are available as ports on BSD.

- liburcu must be compiled from sources
  - version 0.6.4 compiles on BSD without any source code modifications
  - in case of x86_64 build, CFLAGS nad build type has to be set appropriately.
    $ CFLAGS=-fPIC ./configure --build amd64

Knot requires more recent version of flex from ports, to prevent name clash, specify flex destination.
$ cd <knot sources>
$ autoreconf -if
$ LEX_R=/usr/local/bin/flex ./configure
$ make && sudo make install

Installation on OS X
====================

Not all prerequisites are preinstalled for OS X.

- liburcu must be compiled from sources
  - liburcu requires gcc-4.6 from MacPorts, as it depends on __thread keyword
  $ CC=gcc-mp-4.6 ARCH=x86_64 ./configure
  $ make && sudo make install

Compiling Knot with gcc-mp-4.6 is recommended, but not necessary. 

Running
=======

First, each server needs configuration file. Please see samples/knot.sample.conf
for reference. Minimal configuration can be found in samples/knot.min.conf
Configuration zone has to specify:
* storage for PID files, compiled zones etc.
* network interfaces
* served zones

$ cp samples/knot.min.conf myserver.conf
$ vim myserver.conf # or your favourite text editor

Second, zone files have to be compiled to binary form in order for server to
load them. Binary 'knotc' (controller) offers functionality for everything from zone file
management to controlling server instance. Most important parameter is '-c' that
specifies config file for our server. Compiled zones are saved to storage
defined in 'storage' variable in configuration.

$ knotc -h # see what it can do
$ knotc -c myserver.conf compile # compile zone files to binary format

Third, lets load server. You can do this by running 'knotd' directly, or with
'knotc' as well. Server is able to run in daemonized or interactive mode.
Lets start our server in interactive mode (parameter '-i') to see if it runs.

$ knotc -c myserver.conf -i start # start server in interactive mode

Running as daemon
=================

Controller runs server in daemonized mode as default. Disadvantage is, that
it closes stdout/stderr so you need to set up either syslog or logging to
own files in the configuration. Controller parameter '-w' waits for the operation
to finish. Let's test server functionality.

$ knotc -c myserver.conf -w start # start server
$ dig @$ADDR -p $PORT example.com # issue a query and see result
$ ...
$ knotc -c myserver.conf -w stop  # stop server

Also, keep in mind that zone files have to be compiled before they are loaded
to server. Workflow is as follows:

$ knotc -c myserver.conf -w start
$ <edit zonefile>
$ knotc -c myserver.conf compile  # compile zones to binary format
$ knotc -c myserver.conf reload   # reconfigures server on-the-fly
$ dig @$ADDR -p $PORT example.com # issue a query and see result
$ ...
$ knotc -c myserver.conf stop

Supported features
==================

DNS functions:
* AXFR (master)
* EDNS0
* DNSSEC
* NSEC3

Server features:
* Adding/removing zones on-the-fly
* Reconfiguring server instance on-the-fly
* IPv6 support
* Semantic checks of loaded zone