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 11:49] 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 apt-get install -y nodejs+sudo apt install -y nodejs
 </code> </code>
  
Ligne 13: 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 38: Ligne 35:
 </code> </code>
  
-===== Configuration MariaDB =====+===== Configuration Postgresql ===== 
 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 59: Ligne 57:
 </code> </code>
  
-À suivre.+Nous ajoutons le connecteur pour Redis 
 +<code> 
 +  "dbType" : "postgres", 
 +  "dbSettings" : { 
 +    "user":     "etherpad", 
 +    "host":     "localhost", 
 +    "port":     5432, 
 +    "password": "montsupermotdepasse", 
 +    "database": "etherpad", 
 +  }, 
 +</code> 
 + 
 +Nous configurons le compte admin en décommentant / adaptant ce bloc 
 +<code> 
 +  "users":
 +    "admin":
 +      // 1) "password" can be replaced with "hash" if you install ep_hash_auth 
 +      // 2) please note that if password is null, the user will not be created 
 +      "password": "monsupermotdepasse", 
 +      "is_admin": true 
 +    } 
 +  }, 
 +</code>
  
 ===== Configuration Systemd ===== ===== Configuration Systemd =====
Ligne 79: Ligne 99:
 WorkingDirectory=/opt/etherpad WorkingDirectory=/opt/etherpad
 Environment=NODE_ENV=production Environment=NODE_ENV=production
-ExecStart=/usr/bin/nodejs /opt/etherpad/node_modules/ep_etherpad-lite/node/server.js +ExecStart=pnpm run prod 
-Restart=always # use mysql plus a complete settings.json to avoid Service hold-off time over, scheduling restart.+# use mysql plus a complete settings.json to avoid Service hold-off time over, scheduling restart. 
 +Restart=always 
 + 
 +StandardOutput=append:/var/log/etherpad/etherpad.log 
 +StandardError=append:/var/log/etherpad/etherpad-error.log
  
 [Install] [Install]
Ligne 89: 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 94: Ligne 130:
 Nous activons le service via systemd et le lançons Nous activons le service via systemd et le lançons
 <code> <code>
-sudo systemctl enable etherpad.service +sudo systemctl enable --now etherpad.service
-sudo systemctl start etherpad.service+
 </code> </code>
  
Ligne 101: 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 107: 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 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.1681472991.txt.gz
  • Dernière modification : 14/04/2023 11:49
  • de Stéphane Paillet