]> git.ipfire.org Git - thirdparty/pdns.git/blob - README.md
Merge pull request #7057 from mind04/sd-scopemask
[thirdparty/pdns.git] / README.md
1 PowerDNS is copyright © 2001-2018 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 http://doc.powerdns.com/
6
7 This file may lag behind at times. For most recent updates, always check
8 https://doc.powerdns.com/md/changelog/.
9
10 Another good place to look for information is:
11 https://doc.powerdns.com/md/appendix/compiling-powerdns/
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 SOURCE CODE / GIT
19 -----------------
20 Source code is available on GitHub:
21
22 ```sh
23 git clone https://github.com/PowerDNS/pdns.git
24 ```
25
26 This repository contains the sources for the PowerDNS Recursor, the PowerDNS
27 Authoritative Server, and dnsdist (a powerful DNS loadbalancer). All three can
28 be built from this repository. However, all three released separately as .tar.bz2,
29 .deb and .rpm.
30
31 COMPILING Authoritative Server
32 ------------------------------
33 The PowerDNS Authoritative Server depends on Boost, OpenSSL and requires a
34 compiler with C++-2011 support.
35
36 On Debian 9, the following is useful:
37
38 ```sh
39 apt install g++ libboost-all-dev libtool make pkg-config default-libmysqlclient-dev libssl-dev virtualenv
40 ```
41
42 When building from git, the following packages are also required:
43
44 ```sh
45 apt install autoconf automake ragel bison flex
46 ```
47
48 then generate the configure file:
49
50 ```sh
51 autoreconf -vi
52 ```
53
54 To compile a very clean version, use:
55
56 ```sh
57 ./configure --with-modules="" --without-lua --disable-lua-records
58 make
59 # make install
60 ```
61
62 This generates a PowerDNS Authoritative Server binary with no modules built in.
63
64 When `./configure` is run without `--with-modules`, the bind and gmysql module are
65 built-in by default and the pipe-backend is compiled for runtime loading.
66
67 To add multiple modules, try:
68
69 ```sh
70 ./configure --with-modules="bind gmysql gpgsql"
71 ```
72
73 Note that you will need the development headers for PostgreSQL as well in this case.
74
75 See https://doc.powerdns.com/md/appendix/compiling-powerdns/ for more details.
76
77 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.
78
79 Compiling the Recursor
80 ----------------------
81 See the README in pdns/recursordist.
82
83 Compiling dnsdist
84 -----------------
85 See the README in pdns/dnsdistdist.
86
87 Solaris Notes
88 -------------
89 Use a recent gcc. OpenCSW is a good source, as is Solaris 11 IPS.
90
91 If you encounter problems with the Solaris make, gmake is advised.
92
93 FreeBSD Notes
94 -------------
95 You need to compile using gmake - regular make only appears to work, but doesn't in fact. Use gmake, not make.
96
97 The clang compiler installed through FreeBSD's package manager does not expose all of the C++11 features needed under `std=gnuc++11`. Force the compiler to use `std=c++11` mode instead.
98
99 ```sh
100 export CXXFLAGS=-std=c++11
101 ```
102
103 macOS Notes
104 -----------
105 PowerDNS Authoritative Server is available through Homebrew:
106
107 ```
108 brew install pdns
109 ```
110
111 If you want to compile yourself, the dependencies can be installed using
112 Homebrew. You need to tell configure where to find OpenSSL, too.
113
114 ```sh
115 brew install boost lua pkg-config ragel openssl
116 ./configure --with-modules="" --with-lua PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
117 make -j4
118 ```
119
120 Additionally, for PostgreSQL support, run `brew install postgresql` and add `--with-modules="gpsql"` to `./configure`.
121 For MySQL support, run `brew install mariadb` and add `--with-modules="gmysql"` to `./configure`.
122
123 Linux notes
124 -----------
125 None really.