This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| powerdns_centos7 [2015/06/24 18:40] – herwarth | powerdns_centos7 [2015/06/24 20:34] (current) – herwarth | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======PowerDNS on CentOS 7====== | ======PowerDNS on CentOS 7====== | ||
| + | =====Prerequisites====== | ||
| + | * Download latest poweradmin [[https:// | ||
| =====Installation===== | =====Installation===== | ||
| - | yum install pdns-backend-mysql pdns-recursor mariadb-server | + | yum install pdns-backend-mysql pdns-recursor mariadb-server |
| systemctl enable mariadb | systemctl enable mariadb | ||
| systemctl start mariadb | systemctl start mariadb | ||
| mysql_secure_installation | mysql_secure_installation | ||
| + | |||
| + | < | ||
| + | mysql -u root -p | ||
| + | create database powerdns; | ||
| + | GRANT ALL PRIVILEGES ON powerdns.* TO ' | ||
| + | flush privileges; | ||
| + | </ | ||
| + | |||
| + | mysql -u powerdns -p powerdns < / | ||
| + | |||
| =====Configuration===== | =====Configuration===== | ||
| Line 32: | Line 44: | ||
| version-string=powerdns | version-string=powerdns | ||
| </ | </ | ||
| + | <code - / | ||
| + | setuid=pdns-recursor | ||
| + | setgid=pdns-recursor | ||
| + | local-address=127.0.0.1 | ||
| + | local-port=53 | ||
| + | allow-from=127.0.0.0/ | ||
| + | dont-query= | ||
| + | quiet=yes | ||
| + | </ | ||
| + | systemctl start pdns | ||
| + | systemctl start pdns-recursor | ||
| + | systemctl enable pdns | ||
| + | systemctl enable pdns-recursor | ||
| + | firewall-cmd --permanent --zone=management --add-service=dns | ||
| + | firewall-cmd --permanent --zone=local --add-service=dns | ||
| + | =====PowerAdmin===== | ||
| + | cd /usr/share | ||
| + | tar -xzf / | ||
| + | ln -s poweradmin-2.1.7 poweradmin | ||
| + | |||
| + | <code - / | ||
| + | < | ||
| + | ServerAdmin webmaster@dns.mngt.bh.helux.nl | ||
| + | ServerName dns.mngt.bh.helux.nl | ||
| + | |||
| + | RewriteEngine on | ||
| + | RewriteRule ^/(.*)$ https:// | ||
| + | |||
| + | ErrorLog / | ||
| + | CustomLog / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ServerAdmin webmaster@dns.mngt.bh.helux.nl | ||
| + | ServerName dns.mngt.bh.helux.nl | ||
| + | |||
| + | DocumentRoot / | ||
| + | < | ||
| + | Require all granted | ||
| + | </ | ||
| + | |||
| + | SSLEngine On | ||
| + | SSLCertificateFile | ||
| + | SSLCertificateKeyFile / | ||
| + | |||
| + | ErrorLog / | ||
| + | CustomLog / | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | setsebool -P httpd_can_network_connect 1 | ||
| + | systemctl restart httpd | ||
| + | |||
| + | Go to your URL: [[http:// | ||
| + | |||
| + | =====Backup and restore===== | ||
| + | On the old server with older PowerDNS database: | ||
| + | mysqldump -u powerdns -p powerdns > / | ||
| + | |||
| + | On the new server: | ||
| + | mysql -u powerdns -p powerdns < / | ||
| + | |||
| + | Upgrade to new schema: | ||
| + | mysql -u powerdns -p powerdns < / | ||
| + | {{tag> | ||