   _____________________________
  /                             \
  |                             |
  |      Z O N E A D M I N      |
  |            F O R            |
  |       P O W E R D N S       |
  |                             |
  \_____________________________/


DESCRIPTION


REQUIREMENTS
ZoneAdmin has been tested in the following enviroment (Debian Etch with standard packages) so far:

- Apache 2.2.3
- PHP 5.2.0 (may also work with PHP4, but not tested yet)
- PowerDNS 2.9.20
- MySQL 5 with InnoDB support (important!)

ZoneAdmin relies on MySQL's InnoDB storage engine because it supports foreign keys. If you try to setup the tables with the MyISAM engine you will end up having stray records after you delete a domain! This is because with foreign-key support, InnoDB takes care of deleting all record associated with a domain.

Starting with Version 0.1-Beta3, ZoneAdmin ships with version 2.6.14 of the Smarty Template Engine (located at includes/smarty), so there is no need to install the smarty packages any more!

INSTALLATION

Unpack Archive contents
As you're reading this file, you've probably already done this step. In case you've obtained this information elsewhere, execute

tar xfz ZoneAdmin-X.Y.tar.gz

in the folder to where you downloaded ZoneAdmin.

Prepare MySQL
In order to setup ZoneAdmin and PowerDNS, you need to create a database and a user first. We are not going to dig into this now because there is lots of other good documentation on this (easy) step available on the net. The ./contrib folder that came with this distribution contains two .sql files. One is a complete dump (including the tables that are required by PowerDNS's gmysql backend) and the other one just includes the tables that ZoneAdmin needs to support comments, templates etc. (in case you already have a running PowerDNS setup). To import the dump into your newly created (or pre-existing) database, just execute

mysql -u username -p databasename < dumpfile.sql

Prepare web-interface
First, you have to locate your default htdocs-folder. On debian-like systems, this is usually /var/www/. Create a subfolder for your ZoneAdmin setup (e.g. mkdir /var/www/ZoneAdmin ) and copy the contents of this folder (the ZoneAdmin-X.Y folder, where X.Y is the current version) to it. There is no need to copy the contrib folder, as it only contains additional scripts which are intended to be run from the shell (e.g. import comments from BIND zone files etc.).

Make sure that the webserver's user (e.g. www-data or nobody) has the permission to write to the 'templates_c' folder because this is Smarty's compile-directory!

If you need to import zones from an existing BIND setup: this has been tested with BIND 8.x and the zone2sql command which is supplied with PowerDNS. Additionally we provide a script to import comments from zone files to the database (you have to import all zones with zone2sql first). You can find the script in the ./contrib folder (comments.php). As of now, it works only if the zone's filename equals the domain name (otherwise it won't find the domain in the database). It detects comments on the same line as a record as well as multi-line comments above a record.


LIMITATIONS
In this Version, support for adding Slave Zones has been added. But be aware that this is still BETA code and it has not been tested yet!
The History feature has to be rewritten in some ways, because it does not allow to restore large deleted zones. PHPs (un-)serialize() does not work for zones with (approx.) > 100 entries, because the serialized string hits a max-length-limit.
