====== Power DNS ====== ===== Install Packages ===== apt-get install mysql-server mysql-client apt-get install pdns-server pdns-backend-mysql pdns-recursor ===== Create Database ===== mysql -p < powerdns.sql CREATE DATABASE powerdns; GRANT ALL ON powerdns.* TO 'power_admin'@'localhost' IDENTIFIED BY 'power_admin_password'; GRANT ALL ON powerdns.* TO 'power_admin'@'localhost.localdomain' IDENTIFIED BY 'power_admin_password'; FLUSH PRIVILEGES; USE powerdns; CREATE TABLE domains ( id INT auto_increment, name VARCHAR(255) NOT NULL, master VARCHAR(128) DEFAULT NULL, last_check INT DEFAULT NULL, type VARCHAR(6) NOT NULL, notified_serial INT DEFAULT NULL, account VARCHAR(40) DEFAULT NULL, primary key (id) ); CREATE UNIQUE INDEX name_index ON domains(name); CREATE TABLE records ( id INT auto_increment, domain_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, type VARCHAR(6) DEFAULT NULL, content VARCHAR(255) DEFAULT NULL, ttl INT DEFAULT NULL, prio INT DEFAULT NULL, change_date INT DEFAULT NULL, primary key(id) ); CREATE INDEX rec_name_index ON records(name); CREATE INDEX nametype_index ON records(name,type); CREATE INDEX domain_id ON records(domain_id); CREATE TABLE supermasters ( ip VARCHAR(25) NOT NULL, nameserver VARCHAR(255) NOT NULL, account VARCHAR(40) DEFAULT NULL ); ===== Config Files ===== allow-recursion=10.1.0.0/22,127.0.0.1,192.168.0.0/16 config-dir=/etc/powerdns daemon=yes guardian=yes launch=gmysql gmysql-host=127.0.0.1 gmysql-user=power_admin gmysql-password=power_admin_password gmysql-dbname=powerdns lazy-recursion=yes local-address=0.0.0.0 local-port=53 module-dir=/usr/lib/powerdns recursor=127.0.0.1:10053 setgid=pdns setuid=pdns slave=yes slave-cycle-interval=60 socket-dir=/var/run version-string=powerdns include=/etc/powerdns/pdns.d allow-from=127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fe80::/10 forward-zones== local-port=10053 quiet=yes setgid=pdns setuid=pdns ===== Start Daemons ===== /etc/init.d/pdns-recursor restart /etc/init.d/pdns restart ====== Power Admin ====== aptitude install apache2 libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php-pear php5-imap php5-mcrypt php5-mhash php5-ming php5-mysql php5-xmlrpc gettext pear install DB pear install pear/MDB2#mysql cd /tmp wget https://www.poweradmin.org/download/poweradmin-2.1.4.tgz tar xvfz poweradmin-2.1.4.tgz mv poweradmin-2.1.4 /var/www/poweradmin touch /var/www/poweradmin/inc/config.inc.php chown -R www-data:www-data /var/www/poweradmin/ With a web browser navigate to: **http://localhost/poweradmin/install/index.php** ====== Tips ====== ===== Refresh Save Zone ===== pdns_control retrieve