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