Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
infrastructure:services:travail-collaboratif:etherpad:installation [14/04/2023 13:18] Stéphane Pailletinfrastructure:services:travail-collaboratif:etherpad:installation [24/08/2025 15:30] (Version actuelle) Stéphane Paillet
Ligne 6: Ligne 6:
 Nous installons node.js Nous installons node.js
 <code> <code>
-curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - +curl -sL https://deb.nodesource.com/setup_22.x | sudo -E bash - 
-sudo aptitude install nodejs +sudo apt install -y nodejs
-</code> +
- +
-Nous installons Nginx et redis (qui nous servira de base de données) +
-<code> +
-sudo aptitude install nginx redis-server+
 </code> </code>
  
Ligne 18: Ligne 13:
 Nous créons l'utilisateur Nous créons l'utilisateur
 <code> <code>
-sudo adduser --shell /bin/bash --home /opt/etherpad --gecos "Etherpad user" etherpad+sudo adduser --system --group --home /opt/etherpad etherpad
 </code> </code>
- 
-<WRAP center round important 60%> 
-Note importante : le paramètre "--home" est primordial, car au premier lancement, node.js va chercher à écrire dans le home de l'utilisateur (ici etherpad). 
-</WRAP> 
  
 Nous téléchargeons la dernière version d'Etherpad Nous téléchargeons la dernière version d'Etherpad
 <code> <code>
-wget https://github.com/ether/etherpad-lite/archive/1.8.18.tar.gz+curl -L https://github.com/ether/etherpad-lite/archive/refs/tags/v2.4.2.tar.gz -o /opt/etherpad/etherpad-2.4.2.tgz
 </code> </code>
  
 Nous la dézippons et mettons les bons droits, et le plaçons dans son répertoire de travail Nous la dézippons et mettons les bons droits, et le plaçons dans son répertoire de travail
 <code> <code>
-tar xzf 1.8.4.tar.gz +sudo tar xzf etherpad-2.4.2.tgz 
-sudo chown -R etherpad: etherpad-lite-1.8.18 +sudo chown -R etherpad: etherpad-lite-2.4.2 
-sudo mv etherpad-lite-1.8.18/* /opt/etherpad+sudo mv etherpad-lite-2.4.2/* /opt/etherpad 
 +sudo mv etherpad-lite-2.4.2/.* /opt/etherpad
 </code> </code>
  
Ligne 43: Ligne 35:
 </code> </code>
  
-===== Configuration MariaDB ===== +===== Configuration Postgresql =====
-<WRAP center round important 60%> +
-Nous n'utilisons plus MariaDB, mais à défaut de mieux, Redis. +
-</WRAP>+
  
 Nous créons la base de données, et y attachons l'utilisateur Nous créons la base de données, et y attachons l'utilisateur
 <code> <code>
-mysql -u root -p +sudo -u postgres psql 
-create database etherpad; +create user etherpad with encrypted password 'monsupermotdepasse'; 
-grant all privileges on etherpad.* to 'etherpad'@'%' identified by 'mon_super_mot_de_passe'; +create database etherpad with owner etherpad; 
-flush privileges+grant all privileges on database etherpad to etherpad; 
-quit+\q
 </code> </code>
  
Ligne 70: Ligne 59:
 Nous ajoutons le connecteur pour Redis Nous ajoutons le connecteur pour Redis
 <code> <code>
-  "dbType" : "redis",+  "dbType" : "postgres",
   "dbSettings" : {   "dbSettings" : {
-    "host": "localhost", +    "user":     "etherpad", 
-    "port": 6379+    "host":     "localhost", 
-    "database": 0+    "port":     5432, 
 +    "password": "montsupermotdepasse"
 +    "database": "etherpad",
   },   },
 </code> </code>
Ligne 108: Ligne 99:
 WorkingDirectory=/opt/etherpad WorkingDirectory=/opt/etherpad
 Environment=NODE_ENV=production Environment=NODE_ENV=production
-ExecStart=/usr/bin/node /opt/etherpad/node_modules/ep_etherpad-lite/node/server.js+ExecStart=pnpm run prod 
 +# use mysql plus a complete settings.json to avoid Service hold-off time over, scheduling restart.
 Restart=always Restart=always
 +
 +StandardOutput=append:/var/log/etherpad/etherpad.log
 +StandardError=append:/var/log/etherpad/etherpad-error.log
  
 [Install] [Install]
Ligne 118: Ligne 113:
 <code> <code>
 sudo systemctl daemon-reload sudo systemctl daemon-reload
 +</code>
 +
 +Nous installons les dépendances
 +<code>
 +sudo /opt/etherpad/bin/installDeps.sh
 +sudo chown -R etherpad: /opt/etherpad/
 +</code>
 +
 +Nous configurons les logs
 +<code>
 +sudo mkdir /var/log/etherpad
 +sudo chown -R etherpad: /var/log/etherpad/ 
 </code> </code>
  
Ligne 129: Ligne 136:
 <code> <code>
 sudo systemctl status etherpad.service sudo systemctl status etherpad.service
 +</code>
 +
 +===== Proxy Nginx =====
 +
 +Nous installons Nginx
 +<code>
 +sudo apt install -y nginx
 +</code>
 +
 +Nous créons un vHost Nginx
 +<code>
 +sudo vi /etc/nginx/sites-available/pad.domain.tld.conf
 +</code>
 +
 +Nous y collons et adaptons ce contenu
 +<code>
 +À venir.
 +</code>
 +
 +Nous créons le liens symbolique
 +<code>
 +cd /etc/nginx/sites-enabled/
 +sudo ln -s /etc/nginx/sites-available/pad.domain.tld.conf
 +</code>
 +
 +Nous vérifions la configuration et la rechargeons
 +<code>
 +sudo nginx -t
 +sudo systemctl reload neginx.service
 </code> </code>
  
Ligne 135: Ligne 171:
   * [[https://github.com/ether/etherpad-lite#installation|documentation installation]]   * [[https://github.com/ether/etherpad-lite#installation|documentation installation]]
   * [[https://www.howtoforge.com/tutorial/ubuntu-etherpad-editor-server-installation/|How to Install Collaborative Real-time Editor Etherpad on Ubuntu 18.04]]   * [[https://www.howtoforge.com/tutorial/ubuntu-etherpad-editor-server-installation/|How to Install Collaborative Real-time Editor Etherpad on Ubuntu 18.04]]
-  * [[https://etherpad.org/doc/latest/|documentation]]+  * [[https://etherpad.org/doc/latest/|documentation Etherpad-lite]] 
 +  * [[https://github.com/ether/etherpad-lite/wiki/How-to-use-Etherpad-Lite-with-Redis|How to use Etherpad Lite with Redis]]
  • infrastructure/services/travail-collaboratif/etherpad/installation.1681478326.txt.gz
  • Dernière modification : 14/04/2023 13:18
  • de Stéphane Paillet