From 4f656d827e62b2999b76faad2a05e1831b92a8ec Mon Sep 17 00:00:00 2001 From: David Mc Ken Date: Fri, 9 Dec 2022 10:56:08 -0400 Subject: [PATCH] Move DB directions to that section of docs. --- .../database-setup/Setup-MySQL-or-MariaDB.md | 5 ++ docs/wiki/database-setup/Setup-PostgreSQL.md | 22 +++++++- .../Running-PowerDNS-Admin-on-Centos-7.md | 53 +++++++------------ .../Running-PowerDNS-Admin-on-Fedora-30.md | 7 --- 4 files changed, 44 insertions(+), 43 deletions(-) diff --git a/docs/wiki/database-setup/Setup-MySQL-or-MariaDB.md b/docs/wiki/database-setup/Setup-MySQL-or-MariaDB.md index 246a0a5..00586a5 100644 --- a/docs/wiki/database-setup/Setup-MySQL-or-MariaDB.md +++ b/docs/wiki/database-setup/Setup-MySQL-or-MariaDB.md @@ -18,6 +18,11 @@ quit ## Install required packages: ### 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: ``` diff --git a/docs/wiki/database-setup/Setup-PostgreSQL.md b/docs/wiki/database-setup/Setup-PostgreSQL.md index 40c1287..74af46f 100644 --- a/docs/wiki/database-setup/Setup-PostgreSQL.md +++ b/docs/wiki/database-setup/Setup-PostgreSQL.md @@ -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_NAME='powerdns_admin_test' -v /data/node_modules:/var/www/powerdns-admin/node_modules -d -p 9191:9191 ixpict/powerdns-admin-pgsql:latest -``` \ No newline at end of file +``` + +## 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 ** diff --git a/docs/wiki/install/Running-PowerDNS-Admin-on-Centos-7.md b/docs/wiki/install/Running-PowerDNS-Admin-on-Centos-7.md index 18d57f6..cee272c 100644 --- a/docs/wiki/install/Running-PowerDNS-Admin-on-Centos-7.md +++ b/docs/wiki/install/Running-PowerDNS-Admin-on-Centos-7.md @@ -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. ``` -
-**Remove old Python 3.4**
-If you had it installed because of older instructions
-``` -yum remove python34* -yum autoremove -``` -
+## Install required packages: +### Install needed repositories: -## Install required packages -**Install needed repositories:** -
``` 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 ``` -**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 pip3.6 install -U pip 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. - So `mysql-community-devel` is required. For MariaDB, - and PostgreSQL the required package will be different. +yum install gcc openldap-devel xmlsec1-devel xmlsec1-openssl libtool-ltdl-devel ``` -If you use MariaDB ( from [MariaDB repositories](https://mariadb.com/resources/blog/installing-mariadb-10-on-centos-7-rhel-7/) ) - -``` -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** +### Install yarn to build asset files + Nodejs 14: ``` 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 yum install yarn ``` -
-## 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 ``` @@ -68,15 +52,14 @@ Activate your python3 environment and install libraries: pip install python-dotenv pip install -r requirements.txt ``` -
-## 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. ```bash export FLASK_CONF=../configs/development.py ``` -**Then create the database schema by running:** +### Create the database schema: ``` export FLASK_APP=powerdnsadmin/__init__.py 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. -_**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. \ No newline at end of file +_**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. diff --git a/docs/wiki/install/Running-PowerDNS-Admin-on-Fedora-30.md b/docs/wiki/install/Running-PowerDNS-Admin-on-Fedora-30.md index bbd9f03..53f1c7c 100644 --- a/docs/wiki/install/Running-PowerDNS-Admin-on-Fedora-30.md +++ b/docs/wiki/install/Running-PowerDNS-Admin-on-Fedora-30.md @@ -14,11 +14,6 @@ dnf install python37 python3-devel python3-pip ```bash 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** ```bash dnf install gcc gc make @@ -31,8 +26,6 @@ pip3.7 install -U pip ```bash pip install -U virtualenv ``` - - **Install Yarn for building NodeJS asset files:** ```bash dnf install npm