본문 바로가기

엔지니어/Linux

pdns install

728x90
반응형
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 pdn pdns-backend-mysql



[root@localhost ~]# mysql -u root -p mysql


mysql> create database powerdns;

Query OK, 1 row affected (0.00 sec)
mysql> grant all on powerdns.* to power_admin@localhost identified by 'wpdlxn*()890';
mysql> flush privileges;
mysql> use powerdns;

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

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> flush privileges;



mysql> quit



[root@localhost ~]# mv /etc/pdns/pdns.conf /etc/pdns/pdns.conf.ori


[root@localhost ~]# vi /etc/pdns/pdns.conf

setuid=pdns

setgid=pdns



launch=gmysql

gmysql-host=127.0.0.1

gmysql-user=power_admin

gmysql-password=wpdlxn*()890

gmysql-dbname=powerdns




[root@localhost ~]# chkconfig --levels 235 pdns on


[root@localhost ~]# /etc/rc.d/init.d/pdns start




[root@localhost ~]# useradd webdns


[root@localhost ~]# cd ~webdns/html/



[root@localhost html]# wget mirror.koreaidc.com/dns/poweradmin-2.1.6.tgz



[root@localhost html]# tar xvfz poweradmin-2.1.6.tgz



[root@localhost html]# mv poweradmin-2.1.6 poweradmin



[root@localhost html]# cd poweradmin



[root@localhost poweradmin]# pwd

/free/home/webdns/html/poweradmin



[root@localhost poweradmin]# vi /usr/local/apache/conf/extra/httpd-vhosts.conf



<VirtualHost *:80>

    DocumentRoot /free/home/webdns/html/poweradmin

    ServerName x.x.x.x

</VirtualHost>






###. Pdnss poweradmin 연동을 위해서 MDB2 설치 필요




[root@localhost ~]# cd /usr/local/php/bin/



[root@localhost bin]# ./pear install MDB2



[root@localhost bin]# ./pear install MDB2_Driver_mysql



[root@localhost bin]# ldconfig



[root@localhost bin]# killall -9 httpd



[root@localhost bin]# /usr/local/apache/bin/apachectl start




반응형

'엔지니어 > Linux' 카테고리의 다른 글

리눅스 시그널 정리  (0) 2016.05.26
ATS(apache traffic server) 모듈 만들기  (0) 2016.05.26
l2tp  (0) 2016.05.26
우분투 네트워크 디바이스 변경  (0) 2016.05.26
169.254.0.0 이놈은 뭐지?  (0) 2016.05.26