Step 2: Installing PowerAdmin to Manage PowerDNS
11. Now we will install PowerAdmin – a friendly web interface designed to manager PowerDNS servers. Since it is written in PHP, we will need to install PHP and a web server (Apache):
# yum install httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mhash gettext
PowerAdmin also requires two PEAR packages:
# yum -y install php-pear-DB php-pear-MDB2-Driver-mysql
You can also refer to the following article for complete instructions how to install LAMP stack in CentOS 7:
Once the install is complete, we will need to start and set Apache to start at system boot:
# systemctl enable httpd.service # systemctl start httpd.service
12. Now that all system requirements for running PowerAdmn are met, we can proceed and download the package. Since the default web directory for Apache is
/var/www/html/, we will download the package in there.
# cd /var/www/html/ # wget http://downloads.sourceforge.net/project/poweradmin/poweradmin-2.1.7.tgz # tar xfv poweradmin-2.1.7.tgz
13. Now, we can now start the web installer of PowerAdmin. Simply open:
This should bring the first step of the installation:
The above page will ask you to choose the language for your PowerAdmin. Select the one you wish to use and click the “Go to step 2” button.
14. The installer will expect you to have a PowerDNS database:
15. Since we already created one, we can proceed to the next step. You will be asked to enter the database details you setup earlier. You will also need to setup Poweradmin administrator password:
16. Once you have input those, go to step 4. You will create a new user with a limited rights for Poweradmin. The fields that you need to enter here are:
- Username – username for the PowerAdmin.
- Password – password for the above user.
- Hostmaster – When creating SOA records and you have not specified hostmaster, this value will be used.
- Primary nameserver – the value will be used as primary name server when creating new DNS zones.
- Secondary nameserver – the value will be used as primary name server when creating new DNS zones.
17. On the next step Poweradmin will ask you to create new database user with limited rights on the database tables. It will provide you with the code that you will need to put in a MySQL console:
18. Now open a terminal and run:
# mysql -u root -p
Provide your password and execute the code provided by Poweradmin:
MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE ON powerdns.* TO 'powermarin'@'localhost' IDENTIFIED BY '123qweasd';
19. Now go back to your browser and proceed to the next step. The installer will attempt to create its configuration file in /var/www/html/poweradmin-2.1.7/inc.
The file name is config.inc.php. In case the script is not able to write that file you can create it manually by copying the text and putting it in above mentioned file:
20. Now go to the last page where you will be informed that the installation is complete and will receive information how to access your Poweradmin install:
You can enable URLs used by other dynamic DNS providers by running:
# cp install/htaccess.dist .htaccess
For that purpose you will need to have mod_rewrite enabled in Apache’s configuration.
21. Now it is important to remove the “install” folder from Poweradmin’s root directory with the following command:
# rm -fr /var/www/html/poweradmin/install/
After that you can access your poweradmin at:
After logging you should see the Poweradmin main page:
At this point your installation is complete and you are now ready to start managing your DNS zones.
Step 3: How to Add, Edit and Delete DNS Zones in PowerDNS
22. To add new master zone, simply click on the “Add master zone”:
On the next page there are few things that you need to fill:
- Domain – domain for which you will be adding the zone.
- Owner – sets the owner of the DNS zone.
- Template – DNS template – leave to none.
- DNSSEC – Donany Name System Security Extensions (optional -check if you need it).
Click the “Add zone” button to add the DNS zone.
Now you can go back to the index page of Poweradmin by clicking the “Index” link. To review all existing DNS zones simply go to “List zones”:
You should now see a list of available DNS zones:
23. To edit an existing DNS zone or add new records click the edit icon:
On the next page you will see the entries for the DNS zone you have chosen:
24. In here to add new DNS zone you will need to set the following information:
- Name – name for the entry. Only add the first part of the domain/subdomain, the rest will be added by Poweradmin.
- Type – choose the record type.
- Priority – priority of the record.
- TTL – Time To Live in seconds.
For the purpose of this article, I will add an A record for subdomain new.example.com that will resolve on IP address 192.168.0.102 with time to live 14400 seconds:
Finally click the “Add record” button.
25. If you wish to delete a DNS zone you can go back to the “List zone” page and click on the “Trash” icon next to the DNS zone which you wish to delete:
Poweradmin will ask you if you are sure you want to delete the DNS zone. Simply click “Yes” to finish the deletion.
For more detailed instructions how to create, edit and delete zones you can refer to Poweradmin’s documentation at:
I hope you have find this article interesting and useful. As always if you have any questions or comments please do not hesitate to submit them in the comment section below.