Outils pour utilisateurs

Outils du site


admin:services:pad.chapril.org

Ceci est une ancienne révision du document !


Éditeur de pad collaboratif

Installation du système de la vm

La machine a été installée en repectant les procédures d'installations de VM.

Les volumes suivants ont été créés et montés:

  • modele-vg-postgres_data sur /var/lib/postgresql

Installation des services

Installation des pré-requis

Ajout dépot nodejs de nodejs (version récente requise) :

deb https://deb.nodesource.com/node_6.x stretch main
deb-src https://deb.nodesource.com/node_6.x stretch main

Ajout de la clé du dépôt :

curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
apt update
apt-get install gzip git curl python libssl-dev pkg-config build-essential nodejs npm

Installation des sources

mkdir -p /var/www/etherpad-lite
cd /var/www/
git clone git://github.com/ether/etherpad-lite.git
useradd etherpad
sed -e 's|/home/etherpad|/var/www/etherpad-lite|' /etc/passwd -i
chown -R etherpad:etherpad /var/www/etherpad-lite
mkdir -p ~etherpad/.npm
chown -R etherpad:etherpad-lite ~etherpad-lite

Installation de la base postgres

apt install postgresql

Création de l'utilisateur etherpad dans postgres :

sudo -u postgres sh -c 'createuser -d etherpad && createdb -O etherpad etherpad' 

Configuration de nagios pour le monitoring :

Ajouter cette ligne à la fin du fichier /etc/postgresql/9.6/main/pg_hba.conf

host    template1   nagios      127.0.0.1/32                    trust

Ajouter le rôle nagios :

sudo -u postgres sh -c 'createuser nagios' 

Relancer postgres :

systemctl restart postgresql.service

Configuration

Configuration de la base de données dans settings.json:

settings.json
"dbType" : "postgres",
"dbSettings" : {
    "user"    : "etherpad",
    "host"    : "/var/run/postgresql",
    "password": "",
    "database": "etherpad",
    "charset" : "utf8mb4"
},

Le démarrage du service est effectué manuellement de la manière suivante :

su - etherpad -s /bin/bash
./bin/run.sh

Intégration au système

Le script suivant a été écrit pour le démarrage de etherpad au boot:

/etc/systemd/system/etherpad-lite.service
[Unit]
Description=etherpad-lite (real-time collaborative document editing)
After=syslog.target network.target
 
[Service]
Type=simple
User=etherpad-lite
Group=etherpad-lite
ExecStart=/srv/etherpad-lite/bin/run.sh
 
[Install]
WantedBy=multi-user.target
systemctl enable etherpad-lite

Activation du plugin adminpads

Ce plugin permet de remplacer l'ancien système et d'effacer des pads. Il a été installé de la manière suivante:

cd /var/www/etherpad-lite/src
npm i ep_adminpads
systemctl restart etherpad-lite

L'accès à l'interface se fait via https://pad.chapril.org/admin

admin/services/pad.chapril.org.1525877363.txt.gz · Dernière modification : 2018/05/09 14:49 de qgibeaux