Install Virtualizor OpenVZ, PowerDNS, Poweradmin on Centos 6

First install Centos 6 with the following partition on the hardnode (hardnode = master server)

Partition Size Description
/ 20 GB + Root partition containing all Hardware Node operating system files
SWAP 2 times RAM Paging partition for the Linux operating system
/vz all the remaining space on the hard disk Partition to host OpenVZ templates and Virtual Private Servers

After Centos installation we will install Virtualizor OpenVZ ( Virtualizor is a VPS Management Panel. Virtualizor is ideal for Web Hosting companies offering VPS and it could give a significant boost to your sales. Virtualizor supports OpenVZ, Xen Paravirtualization, Xen HVM and Linux-KVM virtualization.):

cd /tmp
wget -N http://files.virtualizor.com/install.sh
chmod 0755 install.sh
./install.sh [email protected]

At the end of the installation copy in your computer API key and APi password

You can login to the Virtualizor Admin Panel using your ROOT details at the following URL :
https://your-IP-address:4085/
OR
http:///your-IP-address:4084/

Install Virtualizor
Install Virtualizor

 

Dont forget to go in iptables

nano /etc/sysconfig/iptables

and remove (or comment) following:

-A INPUT -j REJECT –reject-with icmp-host-prohibited

-A FORWARD -j REJECT –reject-with icmp-host-prohibited

service iptables save

You can install slave server in the same way.

Now we will install PowerDNS (PowerDNS is an advanced high performance authoritative nameserver with a host of backends. Besides plain BIND configuration files, PDNS reads information from MySQL, Oracle, PostgreSQL and many other databases. )

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 mysql-server httpd
chkconfig --levels 235 mysqld on
chkconfig --levels 235 pdns on
service mysqld start
/usr/bin/mysql_secure_installation

Connect to mysql

mysql -u root -p

We will create powerdns database -I choose the name for database – powerdns and user – powerdns

CREATE DATABASE powerdns;
GRANT ALL ON powerdns.* TO 'powerdns'@'xxx.xxx.xxx.xxx' IDENTIFIED BY 'MYNEWPASSWORD';

where xxx.xxx.xxx.xxx is YOUR_IP_ADDRESSS

GRANT ALL ON powerdns.* TO 'powerdns'@'localhost' IDENTIFIED BY 'MYNEWPASSWORD';
FLUSH PRIVILEGES;
USE powerdns;

We will create tables for database:

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

Edit powerDNS configuration file

nano /etc/pdns/pdns.conf
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=root
gmysql-password=MYNEWPASSWORD
gmysql-dbname=powerdns
/etc/init.d/pdns start

Install poweradmin (PowerAdmin is a web-based control panel for PowerDNS):

yum install php-pear-DB php-pear-MDB2-Driver-mysql
cd /tmp
wget https://www.poweradmin.org/download/poweradmin-2.1.7.tgz
tar xvfz poweradmin-2.1.7.tgz
cd poweradmin-2.1.7/inc
mv config-me.inc.php config.inc.php
nano config.inc.php
$db_host = 'localhost';
$db_port = '3306';
$db_user = 'powerdns';
$db_pass = 'MYNEWPASSWORD';
$db_name = 'powerdns';
$db_type = 'mysql';
$session_key = 'session_key';
mv /tmp/poweradmin-2.1.7/* /var/www/html/

Install poweradmin:

http://xxx.xxx.xxx.xxx/install

Launch poweradmin:

http://xxx.xxx.xxx.xxx

Setting for Power DNS server in Virtualizor

Name: with whatever
Description:  with whatever
IP address: xxx.xxx.xxx.xxx (IP address where you install powerdns)
Sql port: 3306
Username: powerdns
Password: MYNEWPASSWORD
SQL Database: powerdns

Add PDNS Server on Virtualizor
Add PDNS Server on Virtualizor

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *