Update README.md

This commit is contained in:
Khanh Ngo 2018-04-01 16:07:41 +07:00 committed by GitHub
parent 3efafecb30
commit df05fded39

View File

@ -1,13 +1,14 @@
# PowerDNS-Admin # PowerDNS-Admin
PowerDNS Web-GUI - Built by Flask A PowerDNS web interface with advanced features.
#### Features: #### Features:
- Multiple domain management - Multiple domain management
- Local / LDAP user authentication - Domain template
- Support Two-factor authentication (TOTP)
- User management - User management
- User access management based on domain - User access management based on domain
- User activity logging - User activity logging
- Local DB / LDAP / Active Directory user authentication
- Support Two-factor authentication (TOTP)
- Dashboard and pdns service statistics - Dashboard and pdns service statistics
- DynDNS 2 protocol support - DynDNS 2 protocol support
- Edit IPv6 PTRs using IPv6 addresses directly (no more editing of literal addresses!) - Edit IPv6 PTRs using IPv6 addresses directly (no more editing of literal addresses!)
@ -18,7 +19,7 @@ PowerDNS Web-GUI - Built by Flask
PowerDNS-Admin supports PowerDNS autoritative server versions **3.4.2** and higher. PowerDNS-Admin supports PowerDNS autoritative server versions **3.4.2** and higher.
### pdns Service ### pdns Service
I assume that you have already installed powerdns service. Make sure that your `/etc/pdns/pdns.conf` has these contents I assume that you have already installed pdns service. Make sure that your `pdns.conf` config file has these contents
PowerDNS 4.0.0 and later PowerDNS 4.0.0 and later
``` ```
@ -34,55 +35,31 @@ experimental-api-key=your-powerdns-api-key
webserver=yes webserver=yes
``` ```
This will enable API access in PowerDNS so PowerDNS-Admin can intergrate with PowerDNS. This will enable API access in pdns service so PowerDNS-Admin can intergrate with it.
### Create Database ### Create Database
We will create a database which used by this web application. Please note that this database is difference from pdns database itself. We will create a database which used by this web application. Please note that this database is difference from pdns database itself.
You could use any database that SQLAlchemy supports. For example MySQL (you will need to `pip install MySQL-python` to use MySQL backend): PowerDNS-Admin supports MySQL server, Maria DB, PostgresQL and SQL Lite.
``` ```
MariaDB [(none)]> CREATE DATABASE powerdnsadmin; MariaDB [(none)]> CREATE DATABASE powerdnsadmin;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON powerdnsadmin.* TO powerdnsadmin@'%' IDENTIFIED BY 'your-password'; MariaDB [(none)]> GRANT ALL PRIVILEGES ON powerdnsadmin.* TO powerdnsadmin@'%' IDENTIFIED BY 'your-password';
``` ```
For testing purpose, you could also use SQLite as backend. This way you do not have to install `MySQL-python` dependency.
### Running PowerDNS-Admin
There are several ways to run PowerDNS-Admin. Following is a simple way to start PowerDNS-Admin with docker in development environment.
### PowerDNS-Admin Firstly, let's edit `configs/developments.py` configuration file.
Secondly, build the docker image of PowerDNS-Admin
` $docker-compose -f docker-compose.dev.yml build`
Finally, start it
`$ docker-compose -f docker-compose.dev.yml up`
In this installation guide, I am using CentOS 7 and run my python stuffs with *virtualenv*. If you don't have it, lets install it: You can now access PowerDNS-Admin at url http://localhost:9191
```
$ sudo yum install python-pip
$ sudo pip install virtualenv
```
In your python web app directory, create a `flask` directory via `virtualenv` NOTE: For other methods to run PowerDNS-Admin, please take look at WIKI pages.
```
$ virtualenv flask
```
Enable virtualenv and install python 3rd libraries
```
$ source ./flask/bin/activate
(flask)$ pip install -r requirements.txt
```
Web application configuration is stored in `config.py` file. Let's clone it from `config_template.py` file and then edit it
```
(flask)$ cp config_template.py config.py
(flask)$ vim config.py
```
Create database after having proper configs
```
(flask)% ./create_db.py
```
Run the application and enjoy!
```
(flask)$ ./run.py
```
### Screenshots ### Screenshots
![login page](https://github.com/ngoduykhanh/PowerDNS-Admin/wiki/images/readme_screenshots/fullscreen-login.png?raw=true) ![login page](https://github.com/ngoduykhanh/PowerDNS-Admin/wiki/images/readme_screenshots/fullscreen-login.png?raw=true)