Files
Ubuntu_docs/PowerDNS_install_PostgreSQL.md
2025-04-07 07:46:21 +05:00

25 lines
906 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

```sh
sudo apt-get install pdns-backend-pgsql -y
```
----------------------------------------------------------------------------------------------------
Подключаюсь к базе и создаю схему базу со схемой из: https://doc.powerdns.com/authoritative/backends/generic-postgresql.html
Настраиваю соединение с базой данных в:
```sh
sudo tee /etc/powerdns/pdns.d/pdns.local.gpgsql.conf <<'EOF'
launch+=gpgsql
# gmysql parameters
gpgsql-host=127.0.0.1
gpgsql-port=5432
gpgsql-dbname=powerdns
gpgsql-user=powerdns
gpgsql-password=y7HMHi0ATxx1VC3UU5WG
gpgsql-dnssec=no
EOF
```
Set access level to file:
```sh
sudo chown pdns: /etc/powerdns/pdns.d/pdns.local.gpgsql.conf &&
sudo chmod 640 /etc/powerdns/pdns.d/pdns.local.gpgsql.conf
```
----------------------------------------------------------------------------------------------------