powerDNS는 zone파일의 형식을 DB화 관리 하여 간편하게 관리 할 수있게 해주는 프로그램 입니다.
Enter password: (패스워드 입력)
mysql> flush privileges;
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)
) Engine=InnoDB;
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(10) DEFAULT NULL,
content VARCHAR(64000) DEFAULT NULL,
ttl INT DEFAULT NULL,
prio INT DEFAULT NULL,
change_date INT DEFAULT NULL,
primary key(id)
) Engine=InnoDB;
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
) Engine=InnoDB;
Enter password: (password 입력 )
// 기본으로 주석 되어있는 부분입니다. 주석을 해제하여 해당 값으로 변경합니다.
allow-recursion=127.0.0.1,192.168.10.2 //localhost 서버 ip 입력
config-dir=/etc/pdns
daemon=yes
disable-axfr=yes
guardian=yes
launch=gmysql
local-port=53
module-dir=/usr/lib/pdns // 64bit 는 /usr/lib64/pdns로 설정 합니다.
recursor=168.126.63.1
setgid=pdns
setuid=pdns
socket-dir=/var/run
version-string=powerdns
//아래 부분을 추가
gmysql-host=localhost
gmysql-user=powerdns
gmysql-password=1234@pass
gmysql-dbname=powerdns
gmysql-port=3306
gmysql-socket=/tmp/mysql.sock
mysql> INSERT INTO `domains` VALUES (1,’youmust.co.kr’,”,NULL,’MASTER’,1,NULL);
mysql> INSERT INTO `records` VALUES (1,1,’youmust.co.kr’,’MX’,’mail.youmust.co.kr’,300,10,1267002606);
mysql> INSERT INTO `records` VALUES (2,1,’mail.youmust.co.kr’,’A’,’183.168.10.1′,300,0,1267002606);
mysql> INSERT INTO `records` VALUES (3,1,’youmust.co.kr’,’NS’,’ns.youmust.co.kr’,300,0,1267002606);
mysql> INSERT INTO `records` VALUES (4,1,’youmust.co.kr’,’A’,’183.168.10.1′,300,0,1267002606);
mysql> INSERT INTO `records` VALUES (5,1,’youmust.co.kr’,’SOA’,’ns.youmust.co.kr dnsmaster@youmust.co.kr2011120800 10800 3600 432000 300′,300,0,1267002606);
mysql> INSERT INTO `records` VALUES (6,1,’www.youmust.co.kr’,’A’,’183.168.10.1′,300,0,1267002606);
mysql> INSERT INTO `records` VALUES (7,1,’www1.youmust.co.kr’,’A’,’183.168.10.1′,300,0,1267002606);
mysql> INSERT INTO `records` VALUES (8,1,’www2.youmust.co.kr’,’A’,’183.168.10.1′,300,0,1267002606);
mysql> INSERT INTO `records` VALUES (9,1,’ns.youmust.co.kr’,’A’,’183.168.10.1′,300,0,1267002606);