This is an old revision of the document!
portsnap fetch portsnap extract cd /usr/ports/dns/powerdns make config # select mysql export BATCH=yes # otherwise you get prompted for a lot of options make install # this takes a while
pkg info | grep mysql | grep client
cd /usr/ports/databases/mysql56-server/ make install
echo "mysql_enable=\"YES\"" > /etc/rc.conf service mysql-server start
mysql_secure_installation # set root password to MYSQLPASSWORD
mysql -p # enter password you changed from MYSQLPASSWORD
create database powerdns; quit;
mysql -p powerdns < /usr/local/share/doc/powerdns/schema.mysql.sql # enter password you changed from CHANGEME
allow-axfr-ips=127.0.0.0/8 #add your domain ranges to this list, this is a "," separated list disable-axfr=no launch=gmysql gmysql-host=127.0.0.1 gmysql-user=root gmysql-password=MYSQLPASSWORD gmysql-dbname=powerdns api=yes api-key=APIPASSWORD webserver=yes webserver-address=127.0.0.1 webserver-port=8081
... # REQUIRE: DAEMON SERVERS mysql ...
echo "pdns_enable=\"YES\"" > /etc/rc.conf service pdns start
pkg install mod_php56 php56 php56-curl php56-json php56-openssl php56-session php56-sqlite3 apache24
<FilesMatch "\.php$"> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> DirectoryIndex index.html index.php
echo "apache24_enable=\"YES\"" > /etc/rc.conf service apache24 start
mkdir -p /usr/local/etc/pdns/web-db chown -R www:www /usr/local/etc/pdns/web-db
$apipass = 'APIPASSWORD'; $apiip = '127.0.0.1'; $apiport = '8081'; $apiproto = 'http'; $authdb = "/usr/local/etc/pdns/web-db/pdns.users.sqlite3";