It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In RegisterIt looks like you're new here. If you want to get involved, click one of these buttons!
Howdy, Stranger!
It looks like you've been lurking for a while.
If you register, we also will remember what you have read and notify you about new comments. You will also be able to participate in discussions.
So if you'd like to get involved, register for an account, it'll only take you a minute!
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum -y install php php-mcrypt php-pdo php-mysql pdns pdns-backend-mysql mysql-server nano
Create a database and username:
service mysqld start
service httpd start
mysqladmin create powerdns
Select your own password below:
mysql -Bse "create user 'powerdns'@'localhost' identified by 'password'"
mysql -Bse "grant all privileges on powerdns.* to 'powerdns'@'localhost'"
Create PowerDNS databases and tablesmysql> 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
);
Exit mysql console by typing "exit":mysql> exit
cd /root
wget https://github.com/downloads/poweradmin/poweradmin/poweradmin-2.1.6.tgz
tar xvfz poweradmin-2.1.6.tgz
cd poweradmin-2.1.6/inc
mv config-me.inc.php config.inc.php
Edit config.inc.php and make sure to change password you've specified in step "Create a Database and Username":nano config.inc.php
$db_host = 'localhost';
$db_port = '3306';
$db_user = 'powerdns';
$db_pass = 'password';
$db_name = 'powerdns';
$db_type = 'mysql';
$session_key = 'session_key';
Move PowerAdmin folder to Apache's DocumentRoot:
mv /root/poweradmin-2.1.6/* /var/www/html/
service httpd restart
Edit /etc/pdns/pdns.conf and add the following lines, make sure to modify "gmysql-password" to MySQL password you've selected in step "Create a Database and Username":
launch=gmysql
gmysql-host=localhost
gmysql-user=powerdns
gmysql-password=password
gmysql-dbname=powerdns
Restart Power DNS daemon:service pdns restart
rm -rf /var/www/html/install
Comments
PowerDNs is a one of the DNS servers like BIND, NSD and so on. This tutorial provides a solution how to deploy DNS server with GUI and manage your domains via web browser.