Steps to install powerDNS on VPS

Posted on March 8, 2009
Filed Under Linux Hosting, VPS hosting, Windows VPS |

What is powerDNS?
PowerDNS: It stands for Power Domain Nameservers. Power DNS is written in C++ language and it is licensed under the GPL. This Power DNS is setup on Linux as well as Windows OS. PowerDNS updates your DNS information (if your DNS is hosted at TextDrive) according to your domains set up in webmin. If you don’t use powerDNS then, you have to first set up the domain so that Apache knows about it then go to your DNS info and make it point at your server.

1) In order, to install PowerDNS on your VPS you will require several modules that is PHP(if you are going to install PowerAdmin web client too) Mysql, DB and MDB2. You can easily Install PHP, MySQL and other required modules by following the below commands:-
yum install mysql mysql-devel mysql-server -y
yum install php-devel php-imap php-pear php-ldap php-gd php-mbstring php-ncurses php-xmlrpc php-domxml php-mysql php-odbc
pear install DB
pear install pear/MDB2#mysql

2) After the installation of modules, you will have to create Database for PDNS. First login to MySQL Console using mysql root password and execute following query to create database:-

mysql> create database power_admin;

Note: You can create any user as a database user for power_admin.  Here I have used root.

3) Now next you will need to create Empty tables inside this database. Following are the SQL Queries to create tables

use power_admin;

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

GRANT SELECT ON supermasters TO power_admin;
GRANT ALL ON domains TO power_admin;
GRANT ALL ON records TO power_admin;

Steps to Install and Configure PDNS on VPS are as follows:-
1) PowerDNS can be installed using YUM or using by the RPM provided by PowerDNS. Following is the command to install PDNS using yum

yum install pdns pdns-backend-mysql

2) Once it is installed you can configure PDNS to work with MySQL Server. Open file /etc/pdns/pdns.conf which is configuration file for PDNS and search for “launch=bind” and change
FROM:

#################################
# launch Which backends to launch and order to query them in
#
launch=bind
bind-example-zones

TO:

#################################
# launch Which backends to launch and order to query them in
#
#launch=bind
#bind-example-zones
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=root
gmysql-password=root_password
gmysql-dbname=power_admin

Once the above configuration is done please save and exit from the file.

3) By using the command “service pdns restart” restart the service. Once it is restarted check that the server is responding to port 53 i.e. Port for DNS service. You can check that using telnet i.e. “telnet localhost 53?.

telnet Install and Configure PowerDNS with MySQL.

Now Power DNS is successfully installed on your VPS.

Update me when site is updated

Comments

Leave a Reply