mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +00:00
Merge pull request #1310 from dmcken/setup-new-wiki-docs-2
Fix PostgreSQL documentation
This commit is contained in:
commit
33277a316d
@ -18,6 +18,11 @@ quit
|
|||||||
|
|
||||||
## Install required packages:
|
## Install required packages:
|
||||||
### Red-hat based systems:
|
### Red-hat based systems:
|
||||||
|
```
|
||||||
|
yum install MariaDB-shared mariadb-devel mysql-community-devel
|
||||||
|
```
|
||||||
|
|
||||||
|
If you use MariaDB ( from [MariaDB repositories](https://mariadb.com/resources/blog/installing-mariadb-10-on-centos-7-rhel-7/) )
|
||||||
|
|
||||||
### Debian based systems:
|
### Debian based systems:
|
||||||
```
|
```
|
||||||
|
@ -53,4 +53,24 @@ docker run --name pdnsadmin-test -e BIND_ADDRESS=0.0.0.0
|
|||||||
-e SQLA_DB_HOST='192.168.0.100'
|
-e SQLA_DB_HOST='192.168.0.100'
|
||||||
-e SQLA_DB_NAME='powerdns_admin_test'
|
-e SQLA_DB_NAME='powerdns_admin_test'
|
||||||
-v /data/node_modules:/var/www/powerdns-admin/node_modules -d -p 9191:9191 ixpict/powerdns-admin-pgsql:latest
|
-v /data/node_modules:/var/www/powerdns-admin/node_modules -d -p 9191:9191 ixpict/powerdns-admin-pgsql:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Install required packages:
|
||||||
|
### Red-hat based systems:
|
||||||
|
```
|
||||||
|
sudo yum install postgresql-libs
|
||||||
|
```
|
||||||
|
|
||||||
|
### Debian based systems:
|
||||||
|
```
|
||||||
|
apt install libpq-dev python-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Install python packages:
|
||||||
|
```
|
||||||
|
pip3 install psycopg2
|
||||||
|
```
|
||||||
|
|
||||||
|
## Known Issues:
|
||||||
|
|
||||||
|
** To fill in **
|
||||||
|
@ -1,59 +1,43 @@
|
|||||||
|
# Installing PowerDNS-Admin on CentOS 7
|
||||||
|
|
||||||
```
|
```
|
||||||
NOTE: If you are logged in as User and not root, add "sudo", or get root by sudo -i.
|
NOTE: If you are logged in as User and not root, add "sudo", or get root by sudo -i.
|
||||||
```
|
```
|
||||||
<br>
|
|
||||||
|
|
||||||
**Remove old Python 3.4**<br>
|
## Install required packages:
|
||||||
If you had it installed because of older instructions<br>
|
### Install needed repositories:
|
||||||
```
|
|
||||||
yum remove python34*
|
|
||||||
yum autoremove
|
|
||||||
```
|
|
||||||
<br>
|
|
||||||
|
|
||||||
## Install required packages
|
|
||||||
**Install needed repositories:**
|
|
||||||
<br>
|
|
||||||
```
|
```
|
||||||
yum install epel-release
|
yum install epel-release
|
||||||
yum install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
yum install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||||
```
|
```
|
||||||
|
|
||||||
**Install Python 3.6 and tools**
|
### Install Python 3.6 and tools:
|
||||||
|
First remove python 3.4 if installed
|
||||||
|
```
|
||||||
|
yum remove python34*
|
||||||
|
yum autoremove
|
||||||
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
yum install python3 python3-devel python3-pip
|
yum install python3 python3-devel python3-pip
|
||||||
pip3.6 install -U pip
|
pip3.6 install -U pip
|
||||||
pip install -U virtualenv
|
pip install -U virtualenv
|
||||||
```
|
```
|
||||||
|
|
||||||
**Install required packages for building python libraries from requirements.txt file**
|
### Install required packages for building python libraries from requirements.txt file:
|
||||||
```
|
```
|
||||||
--> NOTE: I am using MySQL Community server as the database backend.
|
yum install gcc openldap-devel xmlsec1-devel xmlsec1-openssl libtool-ltdl-devel
|
||||||
So `mysql-community-devel` is required. For MariaDB,
|
|
||||||
and PostgreSQL the required package will be different.
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If you use MariaDB ( from [MariaDB repositories](https://mariadb.com/resources/blog/installing-mariadb-10-on-centos-7-rhel-7/) )
|
### Install yarn to build asset files + Nodejs 14:
|
||||||
|
|
||||||
```
|
|
||||||
yum install gcc MariaDB-devel MariaDB-shared openldap-devel xmlsec1-devel xmlsec1-openssl libtool-ltdl-devel
|
|
||||||
```
|
|
||||||
|
|
||||||
If you use default Centos mariadb (5.5)
|
|
||||||
```
|
|
||||||
yum install gcc mariadb-devel openldap-devel xmlsec1-devel xmlsec1-openssl libtool-ltdl-devel
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
**Install yarn to build asset files + Nodejs 14**
|
|
||||||
```
|
```
|
||||||
curl -sL https://rpm.nodesource.com/setup_14.x | bash -
|
curl -sL https://rpm.nodesource.com/setup_14.x | bash -
|
||||||
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo
|
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo
|
||||||
yum install yarn
|
yum install yarn
|
||||||
```
|
```
|
||||||
<br>
|
|
||||||
|
|
||||||
## Checkout source code and create virtualenv
|
### Checkout source code and create virtualenv:
|
||||||
NOTE: Please adjust `/opt/web/powerdns-admin` to your local web application directory
|
NOTE: Please adjust `/opt/web/powerdns-admin` to your local web application directory
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -68,15 +52,14 @@ Activate your python3 environment and install libraries:
|
|||||||
pip install python-dotenv
|
pip install python-dotenv
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
<br>
|
|
||||||
|
|
||||||
## Running PowerDNS-Admin
|
## Running PowerDNS-Admin:
|
||||||
NOTE: The default config file is located at `./powerdnsadmin/default_config.py`. If you want to load another one, please set the `FLASK_CONF` environment variable. E.g.
|
NOTE: The default config file is located at `./powerdnsadmin/default_config.py`. If you want to load another one, please set the `FLASK_CONF` environment variable. E.g.
|
||||||
```bash
|
```bash
|
||||||
export FLASK_CONF=../configs/development.py
|
export FLASK_CONF=../configs/development.py
|
||||||
```
|
```
|
||||||
|
|
||||||
**Then create the database schema by running:**
|
### Create the database schema:
|
||||||
```
|
```
|
||||||
export FLASK_APP=powerdnsadmin/__init__.py
|
export FLASK_APP=powerdnsadmin/__init__.py
|
||||||
flask db upgrade
|
flask db upgrade
|
||||||
@ -97,4 +80,4 @@ Open your web browser and access to `http://localhost:9191` to visit PowerDNS-Ad
|
|||||||
|
|
||||||
At the first time you login into the PDA UI, you will be redirected to setting page to configure the PDNS API information.
|
At the first time you login into the PDA UI, you will be redirected to setting page to configure the PDNS API information.
|
||||||
|
|
||||||
_**Note:**_ For production environment, i would recommend you to run PowerDNS-Admin with gunicorn or uwsgi instead of flask's built-in web server, take a look at WIKI page to see how to configure them.
|
_**Note:**_ For production environment, i would recommend you to run PowerDNS-Admin with gunicorn or uwsgi instead of flask's built-in web server, take a look at WIKI page to see how to configure them.
|
||||||
|
@ -14,11 +14,6 @@ dnf install python37 python3-devel python3-pip
|
|||||||
```bash
|
```bash
|
||||||
dnf install mariadb-devel mariadb-common openldap-devel xmlsec1-devel xmlsec1-openssl libtool-ltdl-devel
|
dnf install mariadb-devel mariadb-common openldap-devel xmlsec1-devel xmlsec1-openssl libtool-ltdl-devel
|
||||||
```
|
```
|
||||||
**Install Postgres dependencies**
|
|
||||||
```bash
|
|
||||||
$ sudo yum install postgresql-libs
|
|
||||||
$ pip3 install psycopg2
|
|
||||||
```
|
|
||||||
**Install Development tools**
|
**Install Development tools**
|
||||||
```bash
|
```bash
|
||||||
dnf install gcc gc make
|
dnf install gcc gc make
|
||||||
@ -31,8 +26,6 @@ pip3.7 install -U pip
|
|||||||
```bash
|
```bash
|
||||||
pip install -U virtualenv
|
pip install -U virtualenv
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
**Install Yarn for building NodeJS asset files:**
|
**Install Yarn for building NodeJS asset files:**
|
||||||
```bash
|
```bash
|
||||||
dnf install npm
|
dnf install npm
|
||||||
|
Loading…
Reference in New Issue
Block a user