README 2.29 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 28
$ sudo apt-get install \
  libcap-ng-dev libsystemd-dev libidn2-0-dev protobuf-c-compiler libfstrm-dev libmaxminddb-dev
29

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

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

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

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

Daniel Salzman's avatar
Daniel Salzman committed
45
Install optional packages:
46
# dnf install \
47
  libcap-ng-devel systemd-devel libidn2-devel protobuf-c-devel fstrm-devel libmaxminddb-devel
48

49 50 51 52
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
53 54 55
2) Install Knot DNS

Get the source code:
56
$ git clone https://gitlab.labs.nic.cz/knot/knot-dns.git
Daniel Salzman's avatar
Daniel Salzman committed
57 58 59 60 61 62 63 64 65 66 67 68
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

69 70 71
Running
=======

72 73
./doc/operation.rst

74 75
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
76
Configuration file has to specify:
77
- storage for PID files, journal and timer databases etc.
Daniel Salzman's avatar
Daniel Salzman committed
78 79
- network interfaces
- served zones
Marek Vavrusa's avatar
Marek Vavrusa committed
80

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

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

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

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