728x90
반응형
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) | 2022.10.28 |
---|---|
정규표현식(레귤러 익스프레션) (0) | 2022.10.28 |
rhel 8 repo 설정 (0) | 2022.10.28 |
sed 및 awk 사용법 (0) | 2022.10.28 |
Firewalld (0) | 2022.02.22 |