您现在的位置: 首页  > 系统运维 > linux
通行证登录

Centos 下安装配置 PowerDNS

作者:[xiao H ]
关于PowerDNS?
PowerDNS 是一个跨平台DNS server 软件,他使用Access/MySQL 记录DNS 信息。这里简单记录在centos系统下PowerDNS 的安装配置及PowerDNS WEB 管理工具PowerAdmin的安装。
安装设置 MySQL
[hew@linuxbyte.org ~]# yum -y install mysql mysql-server [hew@linuxbyte.org ~]# service mysqld start [hew@linuxbyte.org ~]# mysqladmin -u root password password123 [hew@linuxbyte.org ~]# mysql -u root -p
mysql> CREATE DATABASE powerdns; mysql> user 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; 安装并设置PowerDNS
[hew@linuxbyte.org ~]# yum -y install pdns pdns-backend-mysql [hew@linuxbyte.org ~]# vim /etc/pdns/pdns.conf ################################# # launch Which backends to launch and order to query them in # # launch= launch=gmysql gmysql-host=192.168.0.254 gmysql-user=power_admin gmysql-password=password123 gmysql-dbname=powerdns   ################################# [hew@linuxbyte.org ~]# service pdns start 安组PowerDNS web 管理工具 PowerAdmin
a.安装httpd php
[hew@linuxbyte.org ~]# 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 [hew@linuxbyte.org ~]# service httpd start b.下载安装 PowerAdmin
[hew@linuxbyte.org ~]# wget https://www.poweradmin.org/download/poweradmin-2.1.2.tgz [hew@linuxbyte.org ~]# tar zxvf poweradmin-2.1.2.tgz -C /var/www/html/ [hew@linuxbyte.org ~]# mv poweradmin-2.1.2 poweradmin [hew@linuxbyte.org ~]# mv /var/www/html/poweradmin/inc/config.inc.php [hew@linuxbyte.org ~]# chown -R apache:apache /var/www/html/poweradmin/