-
Notifications
You must be signed in to change notification settings - Fork 1
How to install PowerDNS on Ubuntu
TO install PowerDNS on Ubuntu you will have to have installed the zone api php already then follow these instructions to install PowerDNS on Ubuntu...
First, you will need to disable systemd-resolve in order to PowerDNS work properly.
You can do it with the following command:
systemctl disable systemd-resolved
systemctl stop systemd-resolved
Next, remove the default resolv.conf file and create new one with the following command:
rm /etc/resolv.conf
echo "nameserver 172.104.161.158\nnameserver 8.8.8.8" > /etc/resolv.conf
Now, install PowerDNS with the following command:
apt-get install pdns-server pdns-backend-mysql -y
rm /etc/powerdns/pdns.d/bind.conf
During the installation, you will be asked whether to configure the PowerDNS database with dbconfig-common. Select No and press Enter to continue the installation.
Next, you will need to configure PowerDNS to use MySQL. You can do it by editing PowerDNS configuration file this is too point to your Zone API PHP Database:
nano /etc/powerdns/pdns.d/pdns.local.gmysql.conf
Make the following changes:
launch+=gmysql
gmysql-host=localhost
gmysql-port=3306
gmysql-dbname=powerdns
gmysql-user=powerdns
gmysql-password=password
gmysql-dnssec=yes
Save and close the file. Then, restart PowerDNS service to apply the changes:
systemctl restart pdns
You can also check the status of PowerDNS with the following command:
systemctl status pdns
You should see the following output:
pdns.service – PowerDNS Authoritative Server