-----------------
Source code is available on GitHub:
-```
-$ git clone https://github.com/PowerDNS/pdns.git
+```sh
+git clone https://github.com/PowerDNS/pdns.git
```
This repository contains the sources for the PowerDNS Recursor, the PowerDNS
On Debian 8.0, the following is useful:
-```
-$ apt-get install g++ libboost-all-dev libtool make pkg-config libmysqlclient-dev libssl-dev virtualenv
+```sh
+apt-get install g++ libboost-all-dev libtool make pkg-config libmysqlclient-dev libssl-dev virtualenv
```
When building from git, the following packages are also required: autoconf, automake,
ragel, bison and flex, then generate the configure file:
-```
-$ autoreconf -vi
+```sh
+autoreconf -vi
```
To compile a very clean version, use:
-```
-$ ./configure --with-modules="" --without-lua --disable-lua-records
-$ make
+```sh
+./configure --with-modules="" --without-lua --disable-lua-records
+make
# make install
```
To add multiple modules, try:
-```
-$ ./configure --with-modules="bind gmysql gpgsql"
+```sh
+./configure --with-modules="bind gmysql gpgsql"
```
Note that you will need the development headers for PostgreSQL as well in this case.
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.
-```
-$ export CXXFLAGS=-std=c++11
+```sh
+export CXXFLAGS=-std=c++11
```
macOS Notes
PowerDNS Authoritative Server is available through Homebrew:
```
-$ brew install pdns
+brew install pdns
```
If you want to compile yourself, the dependencies can be installed using
Homebrew. You need to tell configure where to find OpenSSL, too.
-```
-$ brew install boost lua pkg-config ragel openssl
-$ ./configure --with-modules="" --with-lua PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
-$ make -j4
+```sh
+brew install boost lua pkg-config ragel openssl
+./configure --with-modules="" --with-lua PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
+make -j4
```
Additionally, for PostgreSQL support, run `brew install postgresql` and add `--with-modules="gpsql"` to `./configure`.
For a more hands-off approach, make sure PowerDNS is built with suitable
modules, and use:
-```
-$ ./start-test-stop 5300 gmysql
+```sh
+./start-test-stop 5300 gmysql
```
To start PowerDNS in gmysql mode (including DNSSEC), run all tests, and
write reports, using udp port 5300 in the process. Use:
-```
-$ ./start-test-stop help
+```sh
+./start-test-stop help
```
to see all available suites.
Run PowerDNS as (to test gmysql):
-```
-$ ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
+```sh
+../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
--no-shuffle --launch=gmysql --gmysql-dbname=pdnstest --gmysql-user=root \
--fancy-records --query-logging --loglevel=9 \
--cache-ttl=0 --no-config
```
or (to test bind, without DNSSEC):
-```
-$ ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
+```sh
+../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
--no-shuffle --launch=bind --bind-config=./named.conf \
--fancy-records --query-logging --loglevel=9 \
--cache-ttl=0 --no-config
or (to test bind with DNSSEC):
-```
-$ ./bind-dnssec-setup
-$ ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
+```sh
+./bind-dnssec-setup
+../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
--no-shuffle --launch=bind --bind-config=./named.conf \
--query-logging --loglevel=9 \
--cache-ttl=0 --no-config
```
Or only sqlite3:
-```
+```sh
rm powerdns.sqlite3
sqlite3 powerdns.sqlite3 < ../pdns/no-dnssec.schema.sqlite3.sql
sqlite3 powerdns.sqlite3 < ../pdns/dnssec.schema.sqlite3.sql
--transactions --dnssec | sqlite3 powerdns.sqlite3
echo 'analyze;' | sqlite3 powerdns.sqlite3
-$ ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
+../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
--no-shuffle --launch=gsqlite3 \
--gsqlite3-database=./powerdns.sqlite3 --gsqlite3-dnssec \
--query-logging --loglevel=9 \
Set the `nameserver` and `port` variables to point to your pdns\_server
instance:
-```
-$ nameserver=127.0.0.1 port=5300 ./runtests
+```sh
+nameserver=127.0.0.1 port=5300 ./runtests
```
Debian Jessie notes
-------------------
On debian-jessie, most of these tools can be retrieved with:
-```
-$ sudo apt-get install validns ldnsutils bind9utils libnet-dns-perl
-$ sudo apt-get -t jessie-backports install unbound-host libunbound2
+```sh
+sudo apt-get install validns ldnsutils bind9utils libnet-dns-perl
+sudo apt-get -t jessie-backports install unbound-host libunbound2
```
libnet-dns-perl is needed for one dyndns test.
This does not install the jdnssec-verifyzone tools. The test that will break without that can be disabled with:
-```
+```sh
touch tests/verify-dnssec-zone/allow-missing
```