]> git.ipfire.org Git - thirdparty/pdns.git/blob - README.md
Merge pull request #14078 from rgacogne/ddist-harvest-quic
[thirdparty/pdns.git] / README.md
1 PowerDNS is copyright © by PowerDNS.COM BV and lots of
2 contributors, using the GNU GPLv2 license (see NOTICE for the
3 exact license and exception used).
4
5 All documentation can be found on https://doc.powerdns.com/
6
7 This file may lag behind at times. For most recent updates, always check
8 https://doc.powerdns.com/authoritative/changelog/
9
10 Another good place to look for information is:
11 https://doc.powerdns.com/authoritative/appendices/compiling.html
12
13 To file bugs, head towards:
14 https://github.com/PowerDNS/pdns/issues
15
16 But please check if the issue is already reported there first.
17
18 DOCKER
19 ------
20
21 This README is mirrored from GitHub to dockerhub.
22 For information about our Docker images, please refer to https://github.com/PowerDNS/pdns/blob/master/Docker-README.md
23
24 SOURCE CODE / GIT
25 -----------------
26 Source code is available on GitHub:
27
28 ```sh
29 git clone https://github.com/PowerDNS/pdns.git
30 ```
31
32 This repository contains the sources for the PowerDNS Recursor, the PowerDNS
33 Authoritative Server, and dnsdist (a powerful DNS loadbalancer). All three can
34 be built from this repository. However, all three released separately as .tar.bz2,
35 .deb and .rpm.
36
37 The different releases can be built by the help of pdns-builder, which uses a
38 docker-based build process. To get started with this, run these commands in the root
39 of this repository:
40
41 ```sh
42 git submodule init
43 git submodule update
44 ./builder/build.sh
45 ```
46
47 This will bring up a USAGE-page which will explain how to build the different releases.
48
49 COMPILING Authoritative Server
50 ------------------------------
51 The PowerDNS Authoritative Server depends on Boost, OpenSSL and Lua, and requires a
52 compiler with C++-2017 support.
53
54 On Debian, the following is useful:
55
56 ```sh
57 apt install g++ libboost-all-dev libtool make pkg-config default-libmysqlclient-dev libssl-dev libluajit-5.1-dev python3-venv
58 ```
59
60 When building from git, the following packages are also required:
61
62 ```sh
63 apt install autoconf automake ragel bison flex
64 ```
65
66 For Ubuntu, the following packages should be installed:
67
68 ```sh
69 apt install libcurl4-openssl-dev luajit lua-yaml-dev libyaml-cpp-dev libtolua-dev lua5.3 autoconf automake ragel bison flex g++ libboost-all-dev libtool make pkg-config libssl-dev lua-yaml-dev libyaml-cpp-dev libluajit-5.1-dev libcurl4 gawk libsqlite3-dev python3-venv
70 # For DNSSEC ed25519 (algorithm 15) support with --with-libsodium
71 apt install libsodium-dev
72 # If using the gmysql (Generic MySQL) backend
73 apt install default-libmysqlclient-dev
74 # If using the gpgsql (Generic PostgreSQL) backend
75 apt install libpq-dev
76 # If using --enable-systemd (will create the service scripts so it can be managed with systemctl/service)
77 apt install libsystemd0 libsystemd-dev
78 # If using the geoip backend
79 apt install libmaxminddb-dev libmaxminddb0 libgeoip1 libgeoip-dev
80 ```
81
82 Then generate the configure file:
83
84 ```sh
85 autoreconf -vi
86 ```
87
88 To compile a very clean version, use:
89
90 ```sh
91 ./configure --with-modules="" --disable-lua-records
92 make
93 # make install
94 ```
95
96 This generates a PowerDNS Authoritative Server binary with no modules built in.
97
98 See https://doc.powerdns.com/authoritative/backends/index.html for a list of available modules.
99
100 When `./configure` is run without `--with-modules`, the bind and gmysql module are
101 built-in by default and the pipe-backend is compiled for runtime loading.
102
103 To add multiple modules, try:
104
105 ```sh
106 ./configure --with-modules="bind gmysql gpgsql"
107 ```
108
109 Note that you will need the development headers for PostgreSQL as well in this case.
110
111 See https://doc.powerdns.com/authoritative/appendices/compiling.html for more details.
112
113 If you run into C++11-related symbol trouble, please try passing `CPPFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0` (or 1) to `./configure` to make sure you are compatible with the installed dependencies.
114
115 Compiling the Recursor
116 ----------------------
117 See [README.md](pdns/recursordist/README.md) in `pdns/recursordist/`.
118
119 Compiling dnsdist
120 -----------------
121 See [README-dnsdist.md](pdns/README-dnsdist.md) in `pdns/`.
122
123 Building the HTML documentation
124 -------------------------------
125
126 The HTML documentation (as seen [on the PowerDNS docs site](https://doc.powerdns.com/authoritative/)) is built from ReStructured Text (rst) files located in `docs`. They are compiled into HTML files using [Sphinx](http://www.sphinx-doc.org/en/master/index.html), a documentation generator tool which is built in Python.
127
128 Install the dependencies under "COMPILING", and run autoreconf if you haven't already:
129
130 ```sh
131 autoreconf -vi
132 ```
133
134 Enter the `docs` folder, and use make to build the HTML docs.
135
136 ```
137 cd docs
138 make html-docs
139 ```
140
141 The HTML documentation will now be available in `html-docs`.
142
143 FreeBSD Notes
144 -------------
145 You need to compile using gmake - regular make only appears to work, but doesn't in fact. Use gmake, not make.
146
147 The clang compiler installed through FreeBSD's package manager does not expose all of the C++17 features needed under the default `std=gnuc++14`. Force the compiler to use `std=c++17` mode instead.
148
149 ```sh
150 export CXXFLAGS=-std=c++17
151 ```
152
153 macOS Notes
154 -----------
155 PowerDNS Authoritative Server is available through Homebrew:
156
157 ```
158 brew install pdns
159 ```
160
161 If you want to compile yourself, the dependencies can be installed using
162 Homebrew. You need to tell configure where to find OpenSSL, too.
163
164 ```sh
165 brew install boost lua pkg-config ragel openssl
166 ./configure --with-modules="" PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
167 make -j4
168 ```
169
170 Additionally, for PostgreSQL support, run `brew install postgresql` and add `--with-modules="gpgsql"` to `./configure`.
171 For MySQL support, run `brew install mariadb` and add `--with-modules="gmysql"` to `./configure`.
172
173 Linux notes
174 -----------
175 None really.