README 2.23 KB
Newer Older
1
Requirements
2
============
3

4
./doc/requirements.rst
5

Jan Mercl's avatar
Jan Mercl committed
6 7
Installation
============
8

9
./doc/installation.rst
10

Daniel Salzman's avatar
Daniel Salzman committed
11
1) Install prerequisites
Jan Mercl's avatar
Jan Mercl committed
12

Daniel Salzman's avatar
Daniel Salzman committed
13 14 15
Debian based distributions
--------------------------
Update the system:
Jan Mercl's avatar
Jan Mercl committed
16 17
$ sudo apt-get update
$ sudo apt-get upgrade
18

Daniel Salzman's avatar
Daniel Salzman committed
19
Install prerequisites:
20
$ sudo apt-get install \
21
  libtool autoconf make pkg-config liburcu-dev libgnutls28-dev libedit-dev
22

23
Install optional packages to override embedded libraries:
24
$ sudo apt-get install liblmdb-dev
25

26
Install optional packages:
27
$ sudo apt-get install libcap-ng-dev libsystemd-dev libidn11-dev protobuf-c-compiler libfstrm-dev
28

Daniel Salzman's avatar
Daniel Salzman committed
29 30
Fedora like distributions
-------------------------
31
Update the system:
32
# dnf upgrade
33

34
Install basic development tools:
35
# dnf install @buildsys-build
36 37

Install prerequisites:
38
# dnf install \
39
  libtool autoconf pkgconfig automake userspace-rcu-devel gnutls-devel libedit-devel
40

41
Install optional packages to override embedded libraries:
42
# dnf install lmdb-devel
43

Daniel Salzman's avatar
Daniel Salzman committed
44
Install optional packages:
45
# dnf install libcap-ng-devel systemd-devel libidn-devel protobuf-c-devel fstrm-devel
46

47 48 49 50
When compiling on RHEL based system, the Fedora EPEL repository has to be
enabled. Also for RHEL 6, forward compatibility package gnutls30-devel
with newer GnuTLS is required instead of gnutls-devel.

Daniel Salzman's avatar
Daniel Salzman committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
2) Install Knot DNS

Get the source code:
$ git clone git://git.nic.cz/knot-dns.git
Or extract source package to knot-dns directory

Compile Knot
$ cd knot-dns
$ autoreconf -if
$ ./configure
$ make

Install Knot DNS into system:
$ sudo make install
$ sudo ldconfig

67 68 69
Running
=======

70 71
./doc/operation.rst

72 73
1) Each server needs configuration file. Please see samples/knot.sample.conf,
project documentation, or man 5 knot.conf for more details.
Jan Kadlec's avatar
Jan Kadlec committed
74
Configuration file has to specify:
75
- storage for PID files, journal and timer databases etc.
Daniel Salzman's avatar
Daniel Salzman committed
76 77
- network interfaces
- served zones
Marek Vavrusa's avatar
Marek Vavrusa committed
78

Daniel Salzman's avatar
Daniel Salzman committed
79 80 81 82
E.g. use the default config file:
$ cd /etc/knot
$ mv knot.sample.conf knot.conf
Modify the config:
83
$ editor knot.conf
Marek Vavrusa's avatar
Marek Vavrusa committed
84

Daniel Salzman's avatar
Daniel Salzman committed
85 86
2) Prepare working directory
$ mv example.com.zone /var/lib/knot/
87

Daniel Salzman's avatar
Daniel Salzman committed
88
3) Start the server. This can be done by running the 'knotd' command.
Daniel Salzman's avatar
Daniel Salzman committed
89 90
Alternatively, your distribution should have an init script available, if you've
installed Knot using a binary package.
91

92
Start Knot in the foreground to see if it runs:
Daniel Salzman's avatar
Daniel Salzman committed
93
$ knotd -c myserver.conf