diff --git a/services/pad.libre-service.eu.md b/services/pad.libre-service.eu.md index 02839bd..e0d0381 100644 --- a/services/pad.libre-service.eu.md +++ b/services/pad.libre-service.eu.md @@ -4,7 +4,10 @@ Le service pad.libre-service.eu est un service de traitement de texte collaborat # Installation -Basée sur https://github.com/ether/etherpad-lite#manual-install +Basée sur : +- https://github.com/ether/etherpad-lite#manual-install +- https://framacloud.org/fr/cultiver-son-jardin/etherpad + ## Prérequis système @@ -26,6 +29,21 @@ ufw enable ## Prérequis logiciels +### Git +Installation de Git pour cloner le code : +``` +apt install git +``` + +### Postgresql + +Base de données : +``` +apt-get install postgresql postgresql-contrib +``` + +### Nodejs + Etherpad nécessite Node.js >= 12.17.0. Vérifier que la version de Debian Stable est compatible : ``` apt-cache show nodejs |grep Version @@ -33,20 +51,114 @@ apt-cache show nodejs |grep Version Installer : ``` -apt install git nodejs +apt install nodejs ``` ## Déploiement +Créer un compte dédié : +``` +adduser --disabled-password --system --group --home /srv/pad.libre-service.eu/ +``` + Déployer le code : ``` cd /var/www git clone --branch master git://github.com/ether/etherpad-lite.git pad.libre-service.eu +chown -R etherpad:etherpad /var/www/pad.libre-service.eu +``` + +Premier lancement : +``` +su -c "cd /var/www/pad.libre-service.eu/ && ./bin/installDeps.sh" etherpad +``` + + +Configuration dans le fichier `/var/www/pad.libre-service.eu/settings.json` : +``` +- "dbType" : "dirty", +- "dbSettings" : { +- "filename" : "var/dirty.db" +- }, + + "dbType" : "postgres", + "dbSettings" : { + "user": "etherpad", + "host": "localhost", + "port": 3306, + "password": "password", + "database": "etherpad", + "charset": "utf8mb4" + }, + + "trustProxy": true, + +Define a password for the admin user:Advertisement + + "users": { + "admin": { + "password": "adminpassword", + "is_admin": true + }, +``` + + +Installer les dépendances nécessaires : +``` +./bin/installDeps.sh ``` -# Mettre à jour +## Configuration Systemd + +Créer le fichier `/etc/systemd/system/etherpad.service` : +``` +[Unit] +Description=Etherpad-lite, the collaborative editor. +After=syslog.target network.target + +[Service] +Type=simple +User=etherpad +Group=etherpad +WorkingDirectory=/opt/etherpad/etherpad-lite +Environment=NODE_ENV=production + +ExecStart=/usr/bin/node /opt/etherpad/etherpad-lite/src/node/server.js + +Restart=always + +[Install] +WantedBy=multi-user.target +``` + +Activer le fichier : +``` +systemctl daemon-reload +``` + + +Next, start the Etherpad service and enable it to start at system reboot with the following command: +``` +systemctl start etherpad +systemctl status etherpad +``` + +Activer le démarrage automatique : +``` +systemctl enable etherpad +``` + +# Mise à jour + +``` +systemctl stop etherpad +cd /var/www/pad.libre-service.eu/ +git pull +./src/bin/run.sh +???????? +systemctl start etherpad +``` -> To update to the latest released version, execute git pull origin. The next start with src/bin/run.sh will update the dependencies.