SOURCECODEBD.NET

Live Experience

Installing and Configuring PowerDNS with Poweradmin

================
Add Repositories
================
# yum install yum-priorities
# rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
# nano -w /etc/yum.repos.d/utterramblings.repo
[utterramblings]

name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
priority=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

================
Installing MySQL
================
# yum install mysql mysql-server
# chkconfig --levels 235 mysqld on
# /etc/init.d/mysqld start
# netstat -tap | grep mysql
# mysqladmin -u root password password

===================
Installing PowerDNS
===================
# yum install pdns pdns-backend-mysql
# mysql -u root -p
mysql> create database powerdns;
mysql> GRANT ALL ON powerdns.* TO 'poweradmin'@'localhost' IDENTIFIED BY 'poweradminpassword';
mysql> FLUSH PRIVILEGES;
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)
);

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
);
mysql> quit
#vi /etc/pdns/pdns.conf

#################################
# launch        Which backends to launch and order to query them in
#
# launch=
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=poweradmin
gmysql-password=poweradminpassword
gmysql-dbname=powerdns

# chkconfig --levels 235 pdns on --> Creates system start-up link for MySQL
# /etc/init.d/pdns start --> Starts PowerDNS

=====================
Installing Poweradmin
=====================
# yum 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

# chkconfig --levels 235 httpd on
# /etc/init.d/httpd start

# yum install php-pear-DB php-pear-MDB2-Driver-mysql

# cd /tmp
# wget https://www.poweradmin.org/download/poweradmin-2.1.2.tgz
# tar xvfz poweradmin-2.1.2.tgz
# mv poweradmin-2.1.2 /var/www/html/poweradmin
# touch /var/www/html/poweradmin/inc/config.inc.php
# chown -R apache:apache /var/www/html/poweradmin/

Now open browser and launch web-based install/ and follow on-screen instructions.

=================
Install SQL Buddy
=================
# wget http://www.sqlbuddy.com/download/sqlbuddy_1_3_2.zip
# unzip sqlbuddy_1_3_2.zip
# mv sqlbuddy /var/www/html/

Now open browser and launch SQL Buddy!

===================================
Setup Database Replication in MySQL
===================================
Follow the steps as described in the other document - MySQL DB Replication

You are here: Home / CentOS / Installing and Configuring PowerDNS with Poweradmin in CentOS