]>
Commit | Line | Data |
---|---|---|
13f74e4c | 1 | PowerDNS is copyright © by PowerDNS.COM BV and lots of |
79a0f9ff CH |
2 | contributors, using the GNU GPLv2 license (see NOTICE for the |
3 | exact license and exception used). | |
bdbf07f0 | 4 | |
620e780a | 5 | All documentation can be found on https://doc.powerdns.com/ |
48cfdbc4 | 6 | |
1d329048 | 7 | This file may lag behind at times. For most recent updates, always check |
3d79c2ac | 8 | https://doc.powerdns.com/authoritative/changelog/ |
1d329048 BH |
9 | |
10 | Another good place to look for information is: | |
3d79c2ac | 11 | https://doc.powerdns.com/authoritative/appendices/compiling.html |
1d329048 | 12 | |
2847a0d2 | 13 | To file bugs, head towards: |
7d7b7179 | 14 | https://github.com/PowerDNS/pdns/issues |
2847a0d2 | 15 | |
7d7b7179 | 16 | But please check if the issue is already reported there first. |
da5d2b0f | 17 | |
dbdcab01 PD |
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 | ||
48cfdbc4 | 24 | SOURCE CODE / GIT |
25 | ----------------- | |
48cfdbc4 | 26 | Source code is available on GitHub: |
27 | ||
d5f41e30 JS |
28 | ```sh |
29 | git clone https://github.com/PowerDNS/pdns.git | |
6942a39e PL |
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. | |
48cfdbc4 | 36 | |
6ea8f68f | 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 | ||
48cfdbc4 | 49 | COMPILING Authoritative Server |
50 | ------------------------------ | |
3d79c2ac | 51 | The PowerDNS Authoritative Server depends on Boost, OpenSSL and Lua, and requires a |
0305e2f8 | 52 | compiler with C++-2017 support. |
1d329048 | 53 | |
78587703 | 54 | On Debian, the following is useful: |
3869cd3b | 55 | |
d5f41e30 | 56 | ```sh |
98508251 | 57 | apt 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 |
60 | When building from git, the following packages are also required: |
61 | ||
62 | ```sh | |
63 | apt install autoconf automake ragel bison flex | |
64 | ``` | |
65 | ||
78587703 | 66 | For Ubuntu, the following packages should be installed: |
c7ccd22e CS |
67 | |
68 | ```sh | |
98508251 | 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 |
cb264691 | 70 | # For DNSSEC ed25519 (algorithm 15) support with --with-libsodium |
c7ccd22e CS |
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 | |
40b01bcf | 75 | apt install libpq-dev |
c7ccd22e CS |
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: | |
3869cd3b | 83 | |
d5f41e30 JS |
84 | ```sh |
85 | autoreconf -vi | |
6942a39e | 86 | ``` |
3869cd3b | 87 | |
d022a079 | 88 | To compile a very clean version, use: |
2e938e5d | 89 | |
d5f41e30 | 90 | ```sh |
d86d172d | 91 | ./configure --with-modules="" --disable-lua-records |
d5f41e30 | 92 | make |
6942a39e PL |
93 | # make install |
94 | ``` | |
2e938e5d | 95 | |
4486aaac | 96 | This generates a PowerDNS Authoritative Server binary with no modules built in. |
1d329048 | 97 | |
c7ccd22e CS |
98 | See https://doc.powerdns.com/authoritative/backends/index.html for a list of available modules. |
99 | ||
4486aaac | 100 | When `./configure` is run without `--with-modules`, the bind and gmysql module are |
1d329048 | 101 | built-in by default and the pipe-backend is compiled for runtime loading. |
2e938e5d BH |
102 | |
103 | To add multiple modules, try: | |
104 | ||
d5f41e30 JS |
105 | ```sh |
106 | ./configure --with-modules="bind gmysql gpgsql" | |
6942a39e | 107 | ``` |
2e938e5d | 108 | |
6942a39e PL |
109 | Note that you will need the development headers for PostgreSQL as well in this case. |
110 | ||
c7ccd22e | 111 | See https://doc.powerdns.com/authoritative/appendices/compiling.html for more details. |
343546e5 | 112 | |
cc2ee9e2 PD |
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 | ||
b1b2586e | 115 | Compiling the Recursor |
48cfdbc4 | 116 | ---------------------- |
a9cad190 | 117 | See [README.md](pdns/recursordist/README.md) in `pdns/recursordist/`. |
3e69796e | 118 | |
b1b2586e CH |
119 | Compiling dnsdist |
120 | ----------------- | |
a9cad190 | 121 | See [README-dnsdist.md](pdns/README-dnsdist.md) in `pdns/`. |
e291c62e | 122 | |
c7ccd22e CS |
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 | ||
c7ccd22e CS |
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 | ||
b1b2586e | 143 | FreeBSD Notes |
343546e5 | 144 | ------------- |
48cfdbc4 | 145 | You need to compile using gmake - regular make only appears to work, but doesn't in fact. Use gmake, not make. |
5088e8bc | 146 | |
208576fb | 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. |
2bf96826 | 148 | |
d5f41e30 | 149 | ```sh |
0305e2f8 | 150 | export CXXFLAGS=-std=c++17 |
b1b2586e | 151 | ``` |
2bf96826 | 152 | |
b1b2586e CH |
153 | macOS Notes |
154 | ----------- | |
43a2814f | 155 | PowerDNS Authoritative Server is available through Homebrew: |
7d7b7179 | 156 | |
6942a39e | 157 | ``` |
d5f41e30 | 158 | brew install pdns |
6942a39e | 159 | ``` |
7d7b7179 JC |
160 | |
161 | If you want to compile yourself, the dependencies can be installed using | |
b1b2586e | 162 | Homebrew. You need to tell configure where to find OpenSSL, too. |
7d7b7179 | 163 | |
d5f41e30 JS |
164 | ```sh |
165 | brew install boost lua pkg-config ragel openssl | |
d86d172d | 166 | ./configure --with-modules="" PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig |
d5f41e30 | 167 | make -j4 |
6942a39e | 168 | ``` |
7d7b7179 | 169 | |
ed1015aa | 170 | Additionally, for PostgreSQL support, run `brew install postgresql` and add `--with-modules="gpgsql"` to `./configure`. |
b1b2586e | 171 | For MySQL support, run `brew install mariadb` and add `--with-modules="gmysql"` to `./configure`. |
7d7b7179 | 172 | |
b1b2586e | 173 | Linux notes |
343546e5 BH |
174 | ----------- |
175 | None really. |