From 1203067a4e33c9ca6897dfa40a13a80454a40220 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Wed, 6 Mar 2019 21:19:54 +0000 Subject: postgresql revision --- tools/postgresql.html | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'tools/postgresql.html') diff --git a/tools/postgresql.html b/tools/postgresql.html index 00fe1ae..285e7c3 100644 --- a/tools/postgresql.html +++ b/tools/postgresql.html @@ -141,7 +141,7 @@ ssl_key_file = '/etc/ssl/keys/pg.key' # (change requires restart) #ssl_ca_file = '' # (change requires restart) #ssl_crl_file = '' # (change requires restart) - password_encryption = on + password_encryption = scram-sha-256

2.5. Configure pg_hba.conf

@@ -152,20 +152,10 @@
         # TYPE  DATABASE        USER            ADDRESS                 METHOD
-
-        # "local" is for Unix domain socket connections only
-        #local   all             all                                     trust
-        local   all             postgres                                 ident
-        # IPv4 local connections:
-        host    all             all             127.0.0.1/32            trust
-        #hostssl    all             all             192.168.0.0/32             md5
-        # IPv6 local connections:
-        #host    all             all             ::1/128                 trust
-        # Allow replication connections from localhost, by a user with the
-        # replication privilege.
-        #local   replication     postgres                                trust
-        #host    replication     postgres        127.0.0.1/32            trust
-        #host    replication     postgres        ::1/128                 trust
+        local   postgres        all             trust
+        host    postgres        all             127.0.0.1/32            trust
+        host    all             all             127.0.0.1/32            scram-sha-256
+        host all all 0.0.0.0/0 reject
         

Start server and alter postgres password

@@ -189,9 +179,10 @@ syslog_facility='LOCAL0' syslog_ident='postgres' log_connections = on + log_disconnections = on + log_duration = on -

Create /etc/logrotate.d/postgres;

@@ -300,7 +291,7 @@
         db_flyspray=# create schema public;
         
-

8. Backup

+

8. Backup and restore

8.1. Dump databases

@@ -317,10 +308,9 @@ Tools Index

This is part of the Hive System Documentation. - Copyright (C) 2018 + Copyright (C) 2019 Hive Team. See the file Gnu Free Documentation License for copying conditions.

- -- cgit 1.4.1-2-gfad0