os:linux:powerdns_apache_postgresql_debian
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
os:linux:powerdns_apache_postgresql_debian [2021-02-07 16:08] – [Setup PowerDNS-Admin from GitHub] Manuel Frei | os:linux:powerdns_apache_postgresql_debian [2024-02-05 20:54] (current) – postgres is no longer a valid option, use postgresql instead Manuel Frei | ||
---|---|---|---|
Line 46: | Line 46: | ||
</ | </ | ||
- | Create the user u_powerdns and the database db_powerdns. Change the example password with your own generated one (eg. [[https://strongpasswordgenerator.com/]]). | + | Create the user u_powerdns and the database db_powerdns. Change the example password with your own generated one (eg. [[https://pwgen.ch/]]). |
<code sql> | <code sql> | ||
CREATE USER u_powerdns WITH PASSWORD ' | CREATE USER u_powerdns WITH PASSWORD ' | ||
Line 84: | Line 84: | ||
</ | </ | ||
- | Replace the database password with the one you generated before. [[https://strongpasswordgenerator.com/ | + | Replace the database password with the one you generated before. [[https://pwgen.ch/ |
<code ini pdns.conf> | <code ini pdns.conf> | ||
# https:// | # https:// | ||
Line 157: | Line 157: | ||
< | < | ||
- | curl -sL https:// | + | curl -fsSL https:// |
apt install -y nodejs | apt install -y nodejs | ||
</ | </ | ||
Line 187: | Line 187: | ||
This requirements are expected by this python libraries: | This requirements are expected by this python libraries: | ||
* python-ldap: | * python-ldap: | ||
- | * mysqlclient: libmariadbclient-dev: | + | * SQLAlchemy: |
Create the config file / | Create the config file / | ||
Line 231: | Line 232: | ||
### DATABASE CONFIG | ### DATABASE CONFIG | ||
- | SQLA_DB_DRIVER = "postgres" # mysql, | + | SQLA_DB_DRIVER = "postgresql" # mysql, |
SQLA_DB_USER = " | SQLA_DB_USER = " | ||
SQLA_DB_PASSWORD = '' | SQLA_DB_PASSWORD = '' | ||
Line 332: | Line 333: | ||
procname-prefix-spaced = %n | procname-prefix-spaced = %n | ||
venv = / | venv = / | ||
- | buffer-size = 65535 | + | buffer-size = 8192 |
; | ; | ||
;log-4xx = true | ;log-4xx = true | ||
Line 441: | Line 442: | ||
ProxyPass "/ | ProxyPass "/ | ||
ProxyPass "/ | ProxyPass "/ | ||
- | ProxyPass "/" | + | ProxyPass "/" |
ErrorLog ${APACHE_LOG_DIR}/ | ErrorLog ${APACHE_LOG_DIR}/ | ||
Line 477: | Line 478: | ||
* PDNS API KEY: aF3kD4eJ0hB1uI1jV8vR2yC0eK8lP9mO | * PDNS API KEY: aF3kD4eJ0hB1uI1jV8vR2yC0eK8lP9mO | ||
* PDNS VERSION: 4.3.1 | * PDNS VERSION: 4.3.1 | ||
+ | |||
+ | ==== Python Upgrade Notes ==== | ||
+ | |||
+ | If you upgrade Python, for example while you upgrade Debian 10 to Debian 11, you have to update the virtual environment. | ||
+ | |||
+ | If you forget this, you can't start the systemd unit an may see an error like this: | ||
+ | < | ||
+ | Oct 18 18:49:14 ns1.example.com uwsgi[731953]: | ||
+ | </ | ||
+ | |||
+ | Upgrade your venv. | ||
+ | < | ||
+ | python3 -m venv --upgrade --upgrade-deps / | ||
+ | </ | ||
+ | |||
+ | And start the Systemd unit again. | ||
+ | < | ||
+ | systemctl start uwsgi@powerdns-admin.service | ||
+ | </ | ||
+ | |||
===== Appendix ===== | ===== Appendix ===== |
os/linux/powerdns_apache_postgresql_debian.1612710495.txt.gz · Last modified: 2021-02-07 16:08 by Manuel Frei