Installation:Debian:PowerDNS
From PMWH2 - PHPMyWebHosting's official wiki
On Debian GNU/Linux you need to install the following packages: Poep
- pdns-server
- pdns-backend-mysql
On Debian GNU/Linux use this command to install all at once:
apt-get install pdns-server pdns-backend-mysql
set launch=gmysql in your /etc/powerdns/pdns.conf file.
and add these lines to your /etc/powerdns/pdns.d/pdns.local file.
# # configure your mysql database settings # gmysql-dbname=pmwh gmysql-host=127.0.0.1 gmysql-socket=/var/lib/mysql/mysql.sock gmysql-password=pmwh_password gmysql-user=pmwh # # Don't change around past this line unless you know what you are doing # gmysql-basic-query=select content,ttl,prio,type,domain_id,name from pdns_records where type='%s' and name='%s' #This is the most used query, needed for doing 1:1 lookups of qtype/name values. First %s is replaced by the ASCII representation of the qtype of the question, the second by the name. gmysql-id-query=select content,ttl,prio,type,domain_id,name from pdns_records where type='%s' and name='%s' and domain_id=%d #Used for doing lookups within a domain. First %s is replaced by the qtype, the %d which should appear after the %s by the numeric domain_id. gmysql-any-query=select content,ttl,prio,type,domain_id,name from pdns_records where name='%s' #The %s is replaced by the qname of the question. #For doing ANY queries. Also used internally. gmysql-any-id-query=select content,ttl,prio,type,domain_id,name from pdns_records where name='%s' and domain_id=%d #The %s is replaced by the name of the domain, the %d by the numerical domain id. #For doing ANY queries within a domain. Also used internally. #The last query is for listing the entire contents of a zone. This is needed when performing a zone transfer, but sometimes also internally: gmysql-list-query=select content,ttl,prio,type,domain_id,name from pdns_records where domain_id=%d gmysql-master-zone-query=select master from pdns_domains where name='%s' and type='SLAVE' #Called to determine the master of a zone. gmysql-info-zone-query=select id,name,master,last_check,notified_serial,type from pdns_domains where name='%s' #Called to retrieve (nearly) all information for a domain: gmysql-info-all-slaves-query=select id,name,master,last_check,type from pdns_domains where type='SLAVE' #Called to retrieve all slave domains gmysql-supermaster-query=select account from supermasters where ip='%s' and nameserver='%s' #Called to determine if a certain host is a supermaster for a certain domain name. gmysql-insert-slave-query=insert into pdns_domains (type,name,master,account) values('SLAVE','%s','%s','%s') #Called to add a domain as slave after a supermaster notification. gmysql-insert-record-query=insert into pdns_records (content,ttl,prio,type,domain_id,name) values ('%s',%d,%d,'%s',%d,'%s') #Called during incoming AXFR. gmysql-update-serial-query=update pdns_domains set notified_serial=%d where id=%d #Called to update the last notified serial of a master domain. gmysql-update-lastcheck-query=update pdns_domains set notified_serial=%d where id=%d #Called to update the last time a slave domain was checked for freshness. gmysql-info-all-master-query=select id,name,master,last_check,notified_serial,type from pdns_domains where type='MASTER' #Called to get data on all pdns_domains for which the server is master. gmysql-delete-zone-query=delete from pdns_records where domain_id=%d #Called to delete all records of a zone. Used before an incoming AXFR. gmysql-wildcard-query=select content,ttl,prio,type,domain_id,name from pdns_records where type='%s' and name like '%s' #Can be left blank. See above for an explanation. gmysql-wildcard-id-query=select content,ttl,prio,type,domain_id,name from pdns_records where type='%s' and name like '%s' and domain_id=%d #Used for doing lookups within a domain. #Can be left blank. See above for an explanation. gmysql-wildcard-any-query=select content,ttl,prio,type,domain_id,name from pdns_records where name like '%s' #For doing wildcard ANY queries. gmysql-wildcard-any-id-query=select content,ttl,prio,type,domain_id,name from pdns_records where name like '%s' and domain_id=%d #For doing wildcard ANY queries within a domain.