installation/nextcloud_itopie.md: [pgsql] atomic + Debian reload authored by Luca Capello's avatar Luca Capello
This complements fc62fd65e1db7454e002c3876c218696428113f7 and
c256080bb19370dcede045fcbc9335a76809934e, and fixes
<https://odoo.itopie.ch/web#id=281&action=491&active_id=2&model=project.task&view_type=form&cids=&menu_id=323>.
...@@ -341,24 +341,29 @@ ...@@ -341,24 +341,29 @@
postgres=# create user ncadmin with encrypted password '${ncadmin_DB_PASSWORD}'; postgres=# create user ncadmin with encrypted password '${ncadmin_DB_PASSWORD}';
postgres=# grant all privileges on database nextcloud to ncadmin; postgres=# grant all privileges on database nextcloud to ncadmin;
``` ```
1. Configurer la connexion en socket 1. Configurer la connexion en socket (et mapping) :
```
# nano /etc/postgresql/15/main/pg_hba.conf
```
- Tout au début de la section "local", ajouter :
``` ```
# cat <<EOF >>/etc/postgresql/15/main/pg_hba.conf
### Connexion en socket
local nextcloud all ident map=nextcloud local nextcloud all ident map=nextcloud
EOF
# cat <<EOF >>/etc/postgresql/15/main/pg_ident.conf
nextcloud www-data ncadmin
EOF
#
``` ```
- Le compte de base de données nextcloud a tous les droits localement pour la connexion en socket. Le mapping se fait dans un autre fichier : pg_ident.conf 1. Recharger la configuration :
```
# nano /etc/postgresql/15/main/pg_ident.conf
```
- Le mapping entre les comptes POSIX et ceux de la base de données se fait à la fin du fichier :
``` ```
# MAPNAME SYSTEM-USERNAME PG-USERNAME # pg_lsclusters
nextcloud www-data ncadmin Ver Cluster Port Status Owner Data directory Log file
15 main 5432 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log
# pg_ctlcluster 15 main reload
#
``` ```
### Installation de Nextcloud ### Installation de Nextcloud
1. Télécharger et décompresser les fichiers 1. Télécharger et décompresser les fichiers
``` ```
... ...
......