forked from PowerDNS-Admin/PowerDNS-Admin
-
Notifications
You must be signed in to change notification settings - Fork 0
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.
- git
- python
- python-pip
- python-dev
- libmysqlclient-dev (or libmariadbclient-dev if you are using MariaDB)
- libsasl2-dev
- libldap2-dev
- libssl-dev
Follow the Prepare MySQL or MariaDB Database for PowerDNS-Admin guide to get your database ready.
- ivan@ubuntu:~$
sudo apt-get install git python-pip python-dev libmysqlclient-dev libsasl2-dev libldap2-dev libssl-dev
- ivan@ubuntu:~$
sudo pip install virtualenv
- ivan@ubuntu:~$
git clone https://github.com/ngoduykhanh/PowerDNS-Admin.git
- ivan@ubuntu:~/PowerDNS-Admin$
cd PowerDNS-Admin
- ivan@ubuntu:~/PowerDNS-Admin$
virtualenv flask
- ivan@ubuntu:~/PowerDNS-Admin$
source ./flask/bin/activate
- (flask) ivan@ubuntu:~/PowerDNS-Admin$
pip install -r requirements.txt
- (flask) ivan@ubuntu:~/PowerDNS-Admin$
cp config_template.py config.py
- (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 bepdnsadminuser
- replace
123456
with your database password, if you followed the preparation guide this will bep4ssw0rd
- 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 bepowerdnsadmin
- replace
-
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 PowerDNSpdns.conf
file
- This need to be the same as the
- (flask) ivan@ubuntu:~/PowerDNS-Admin$
./create_db.py
- If you do
pip install -r requirements.txt
successfully but get message likeERROR: Couldn't connect to database server
at this step, try to dopip install mysql
in virtualenv. (#126)
- (flask) ivan@ubuntu:~/PowerDNS-Admin$
./run.py
PowerDNS-Admin does not come with an Administrator user built in, the first created user will become an Administrator automatically.
- Open http://127.0.0.1:9393 (or your server address) in your browser
2. Click Create an account
3. Fill in the form and hit Submit
4. Sign in as the new Administrator user