Now all prerequisites for Poweradmin are installed, and we can begin with the Poweradmin installation (I will install it in a subdirectory of /var/www/html - /var/www/html is the document root of Apache's default web site on Sabayon; if you've created a vhost with a different document root, please adjust the paths).

+

Now all prerequisites for Poweradmin are installed, and you can begin with the Poweradmin installation (I will install it in a subdirectory of /var/www/html - /var/www/html is the document root of Apache's default web site on Sabayon; if you've created a vhost with a different document root, please adjust the paths).

<!-- FIXME: Look for the defaul document root of Sabayon's Apache -->

<!-- FIXME: Look for the defaul document root of Sabayon's Apache -->

Line 191:

Line 191:

[[File:Pdns_pic3.png|right]]

[[File:Pdns_pic3.png|right]]

−

Now fill in your database details. It is important that you fill in the details for the MySQL root user, not the powerdns MySQL user we created earlier! Also provide a password for the admin user for the Poweradmin web interface (that's the password that the user admin will use to log in to Poweradmin later on):

+

Now fill in your database details. It is important that you fill in the details for the MySQL root user, not the powerdns MySQL user you created earlier! Also provide a password for the admin user for the Poweradmin web interface (that's the password that the user admin will use to log in to Poweradmin later on):

<br clear=all>

<br clear=all>

[[File:Pdns_pic4.png|right]]

[[File:Pdns_pic4.png|right]]

−

On the next page, fill in the details for the power_admin MySQL user that we created in chapter 3. Also fill in the two default nameservers that will be used in your zones unless you provide different nameservers when you create a zone (typically these are the names of the current system and of the slave server (for which you can set up MySQL replication, see my preliminary notes in chapter 1)):

+

On the next page, fill in the details for the power_admin MySQL user that you created in chapter 3. Also fill in the two default nameservers that will be used in your zones unless you provide different nameservers when you create a zone (typically these are the names of the current system and of the slave server (for which you can set up MySQL replication, see the preliminary notes in chapter 1)):

<br clear=all>

<br clear=all>

[[File:Pdns_pic5.png|right]]

[[File:Pdns_pic5.png|right]]

−

On the next screen the installer asks you to execute a MySQL query. We don't have to do that because we've done something similar in chapter 3 already (the two ''GRANT'' statements) so we are set. Click on ''Go to step 6'':

+

On the next screen the installer asks you to execute a MySQL query. You don't have to do that because you have done something similar in chapter 3 already (the two ''GRANT'' statements) so you are set. Click on ''Go to step 6'':

<br clear=all>

<br clear=all>

Line 211:

Line 211:

[[File:Pdns_pic8.png|right]]

[[File:Pdns_pic8.png|right]]

−

... but for security reasons we must delete the install directory:

+

... but for security reasons you must delete the install directory:

<pre>

<pre>

rm -fr /var/www/html/poweradmin/install/

rm -fr /var/www/html/poweradmin/install/

Revision as of 09:26, 18 January 2013

Contents

Description

PowerDNS is a DNS server, written in C++ and licensed under the GPL. The current version in entropy is 3.1. It's a product of the Dutch company PowerDNS.COM BV, with numerous contributions from the Open Source community. There are many independent projects to create management interfaces for PowerDNS, including PowerAdmin, PDNSOps, PowerDNS on rails and JPower Admin and even a drupal module called PowerAdmin. The following instructions describe the steps for the installation of the PowerDNS nameserver with MySQL backend and the Poweradmin control panel for PowerDNS.

Installation

Preliminary Note

In this example, the hostname is server1.example.com and the IP address is 192.168.0.100. Just one PowerDNS server (a master) will be set up. PowerDNS slave(s) can easily be achieved by using MySQL database replication from the master to the slave(s), therefore no zone transfers are needed. MySQL database replication can be set up according to this tutorial: How To Set Up Database Replication In MySQL (PowerDNS also supports native zone transfers (for scenarios where you cannot use MySQL replication) - see http://downloads.powerdns.com/documentation/html/replication.html).

Installing MySQL

To install MySQL v5, do the following as root:

equo install dev-db/mysql

Then create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) (this is a FIXME)
and start the MySQL server:

Installing PowerDNS

The PowerDNS configuration is located in the /etc/pdns directory - I'll come to that in a moment.

Now we connect to MySQL:

mysql -u root -p

Type in your MySQL root password, and you should be on the MySQL shell. On the MySQL shell, create a database for PowerDNS:

CREATE DATABASE powerdns;

Next, create a database user (powerdns) for PowerDNS:

GRANT ALL ON powerdns.* TO 'power_admin'@'localhost' IDENTIFIED BY 'power_admin_password';
GRANT ALL ON powerdns.* TO 'power_admin'@'localhost.localdomain' IDENTIFIED BY 'power_admin_password';
FLUSH PRIVILEGES;

Now all prerequisites for Poweradmin are installed, and you can begin with the Poweradmin installation (I will install it in a subdirectory of /var/www/html - /var/www/html is the document root of Apache's default web site on Sabayon; if you've created a vhost with a different document root, please adjust the paths).

Now fill in your database details. It is important that you fill in the details for the MySQL root user, not the powerdns MySQL user you created earlier! Also provide a password for the admin user for the Poweradmin web interface (that's the password that the user admin will use to log in to Poweradmin later on):

On the next page, fill in the details for the power_admin MySQL user that you created in chapter 3. Also fill in the two default nameservers that will be used in your zones unless you provide different nameservers when you create a zone (typically these are the names of the current system and of the slave server (for which you can set up MySQL replication, see the preliminary notes in chapter 1)):

On the next screen the installer asks you to execute a MySQL query. You don't have to do that because you have done something similar in chapter 3 already (the two GRANT statements) so you are set. Click on Go to step 6:

To create a zone, go to Add master zone and fill in the domain name (e.g. example.com). You can already fill in the IP addresses for the www A record ("webserver") and the MX record ("mailserver") for that zone. If you leave the Create zone without applying records-template checkbox unchecked, Poweradmin will automatically create some NS, A (e.g. www) and MX records for that zone:

Go to List zones afterwards. You should now see the new zone there, and it already has eight records. Click on the edit icon to see these eight records:

These are the records that are created automatically unless you check the Create zone without applying records-template checkbox when you create a zone. You can now edit them or add and delete records:

Of course, you can as well create all records one-by-one manually - just leave the IP address fields empty and check the Create zone without applying records-template checkbox on the Add master zone page:

On the List zones page you will see that the new zone has just one record (the SOA record). Click on the edit icon...

... and then on Add record to add further records, ...

..., e.g. NS records...

... and A records (e.g. for mydomain.com (leave the Name field empty!) and www.mydomain.com)...

... and MX records:

To create PTR records, go to the Add master zone page and create a zone called in-addr.arpa (leave the IP address fields empty and check the Create zone without applying records-template checkbox):

To create a PTR record that points from the IP 1.2.3.4 to server1.example.com, create a record under List zones and fill in 4.3.2.1 in the Name field (that's the IP in reverse order) and server1.example.com in the Content field:

After you've created your records, you can check them with the dig command (see

Responsible person

If you're interested, please ask BlackNoxis on the forums. He wants to engage Gentoo/Sabayon users in this project.
At the moment he plans on supporting this project on RogentOS, a Sabayon fork. You can get the latest poweradmin version there, too. See Link section below for further details.