PowerDNS is a DNS server, written in C++ and licensed under the GPL. It runs on most Unix derivatives and on Microsoft Windows. PowerDNS can be managed through a web interface (PowerAdmin).

Install MySQL,

# yum install mysql* -y

After installation, start it and create system startup links for MySQL.

# service mysqld start; chkconfig mysqld on

If you want to set root password,

# mysqladmin -u root password Test@123

Install PowerDNS.

# yum -y install pdns pdns-backend-mysql

Setting database

# mysql

mysql> CREATE DATABASE powerdns;

mysql> use powerdns;

mysql> 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)

);

mysql> CREATE UNIQUE INDEX name_index ON domains(name);

mysql > 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)

);

mysql> CREATE INDEX rec_name_index ON records(name);

mysql> CREATE INDEX nametype_index ON records(name,type);

mysql> CREATE INDEX domain_id ON records(domain_id);

mysql > CREATE TABLE supermasters (

ip VARCHAR(25) NOT NULL,

nameserver VARCHAR(255) NOT NULL,

account VARCHAR(40) DEFAULT NULL

);

mysql> quit;

launch=gmysql

gmysql-host=localhost

gmysql-user=powerdns

gmysql-password=power123

gmysql-dbname=powerdns

Restart PowerDNS and create the system startup links for it.

# service pdns start; chkconfig –levels 235 pdns on

Now install PowerAdmin,

# yum -y install httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mhash gettext php-pear-DB php-pear-MDB2-Driver-mysql

Start Apache server,

# service httpd start; chkconfig httpd on

Download PowerAdmin,

# wget https://www.poweradmin.org/download/poweradmin-2.1.5rc1.tgz

# tar xvzf poweradmin-2.1.5rc1.tgz -C /var/www/html/

# mv poweradmin-2.1.5rc1/ poweradmin

# cd /var/www/html/powerdns/inc

# cp config-me.inc.php config.inc.php

# chown -R apache:apache /var/www/html/poweradmin/

# vim config.inc.php

$db_host = ‘localhost’;

$db_port = ’3306′;

$db_user = ‘powerdns’;

$db_pass = ‘power123′;

$db_name = ‘powerdns’;

$db_type = ”;

Save and exit the file.

Now start http://192.168.100.101/poweradmin/install/ in firefox and follow installation steps.

In Installation Step 3, enter DB name, DB user and password information.

From here, you can access PowerAdmin web interface.

Related Articles: