Installation - notihnio/PowerDNS-API GitHub Wiki

PowerDNS::API installation

Requirements

  • MySQL
  • Perl 5.10.1 or newer
  • Various modules from CPAN
  • PowerDNS 3.1+

Setup the database

Install and start the MySQL server somewhere.

The login credentials can be configured in powerdns-api.conf, see powerdns-api.conf.sample. The default development setup is just to use the root user and powerdns database.

Load the schema into your database with mysql -uroot pdns < docs/full-schema.sql.

If you are upgrading an existing PowerDNS database, use the docs/schema.sql file instead (carefully).

Install Perl modules

install cpanm and local::lib as root or with sudo:

curl -sL http://xrl.us/cpanm | perl - --sudo App::cpanminus
cpanm --sudo local::lib

Then with your regular account setup local::lib:

perl -Mlocal::lib >> ~/.bash_profile

Logout and login again and then you can run the following to install the various dependencies; they will be installed into ~/perl5/ in your home directory.

cpanm < .travis.dependencies

You can add -n as a cpanm parameter if you don't want to run the tests for each CPAN module.

Start the server

For development:

morbo -v script/powerdns_api

For production:

hypnotoad -f script/powerdns_api

Remove -f to run as a daemon in the background.

Setup a user

Use ./script/powerdns_api account username password to setup a new user account for the API, see Authentication for more information.

Use the API

See the REST API page for API documentation.