This article covers the step by step procedure to install PowerDNS on CentOS 7. PowerDNS (pdns) is an open source DNS server written in C++ and released under GPL License. It has become a good alternative for the traditional DNS server Bind, designed with better performance and low memory requirements.
PowerDNS provides two products, the Authoritative server, and the Recursor.
The PowerDNS Authoritative server can be configured through the different backend, including the plain Bind zone files, RDBMS such as MySQL, PostgreSQL, SQLite3 or LDAP.
To Install PowerDNS on CentOS 7:
1. First let's start by ensuring your system is up-to-date:
$ yum clean all
$ yum -y update
2. Install PowerDNS and backend.
First, you need to enable EPEL repository and all required packages on your system:
$ yum install epel-release
$ yum install bind-utils pdns pdns-recursor pdns-backend-mysql mariadb mariadb-server
Enable PowerDNS on boot and start PowerDNS server:
$ systemctl enable mariadb
$ systemctl enable pdns
$ systemctl enable pdns-recursor
3. Configure MariaDB.
By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:
4. Create PowerDNS Database and User in MariaDB.
Login as a MariaDB root and create a new database and tables:
### mysql -uroot -p
5. Configure PowerDNS.
Open the /etc/pdns/pdns.conf file.
Finally, restart the Power DNS service:
$ systemctl restart pdns.service
$systemctl enable pdns.service
6. Configure Recursor.
Open the /etc/pdns-recursor/recursor.conf file.