Skip to content

Install PowerDNS Admin in Ubuntu 14.04 LTS or 16.04 LTS

Phoenix Nemo edited this page Sep 7, 2016 · 2 revisions

This guide was tested on the server versions of Ubuntu 14.04 LTS and 16.04 LTS. This guide can be followed from a bare bones Ubuntu install and should apply to most users.

Pre-requisites:

  • git
  • python
  • python-pip
  • python-dev
  • libmysqlclient-dev (or libmariadbclient-dev if you are using MariaDB)
  • libsasl2-dev
  • libldap2-dev
  • libssl-dev

Database preparation

Follow the Prepare MySQL or MariaDB Database for PowerDNS-Admin guide to get your database ready.

Step-by-step installation

  1. ivan@ubuntu:~$ sudo apt-get install git python-pip python-dev libmysqlclient-dev libsasl2-dev libldap2-dev libssl-dev
  2. ivan@ubuntu:~$ sudo pip install virtualenv
  3. ivan@ubuntu:~$ git clone https://github.com/ngoduykhanh/PowerDNS-Admin.git
  4. ivan@ubuntu:~/PowerDNS-Admin$ cd PowerDNS-Admin
  5. ivan@ubuntu:~/PowerDNS-Admin$ virtualenv flask
  6. ivan@ubuntu:~/PowerDNS-Admin$ source ./flask/bin/activate
  7. (flask) ivan@ubuntu:~/PowerDNS-Admin$ pip install -r requirements.txt
  8. (flask) ivan@ubuntu:~/PowerDNS-Admin$ cp config_template.py config.py
  9. (flask) ivan@ubuntu:~/PowerDNS-Admin$ vim config.py or use your favorite editor
  • The most important options to change in config.py are
  • PORT = 9393 defines port number on which PowerDNS-Admin will run on
  • SQLALCHEMY_DATABASE_URI = 'mysql://root:[email protected]/pdns' defines the connection to your database
    • replace root with your database username, if you followed the preparation guide this will be pdnsadminuser
    • replace 123456 with your database password, if you followed the preparation guide this will be p4ssw0rd
    • replace 192.168.59.103 with your database hostname or IP address
    • replace pdns with your database name, if you followed the preparation guide this will be powerdnsadmin
  • PDNS_STATS_URL = http://172.16.214.131:8081 defines where your PowerDNS server API can be located
  • PDNS_API_KEY = 'you never know' defines your PowerDNS API key
    • This need to be the same as the experimental-api-key setting in your PowerDNS pdns.conf file
  1. (flask) ivan@ubuntu:~/PowerDNS-Admin$ ./create_db.py
  • If you do pip install -r requirements.txt successfully but get message like ERROR: Couldn't connect to database server at this step, try to do pip install mysql in virtualenv. (#126)
  1. (flask) ivan@ubuntu:~/PowerDNS-Admin$ ./run.py

Creating the first user

PowerDNS-Admin does not come with an Administrator user built in, the first created user will become an Administrator automatically.

  1. Open http://127.0.0.1:9393 (or your server address) in your browser

Index 2. Click Create an account 3. Fill in the form and hit Submit

Create an account 4. Sign in as the new Administrator user

Login