Outils d'utilisateurs

Outils du Site


etherpad-lite_install

Différences

Cette page vous donne les différences entre la révision choisie et la version actuelle de la page.

Lien vers cette vue

etherpad-lite_install [2013/07/15 22:29]
yannick [Installation d'Etherpad-Lite]
— (Version actuelle)
Ligne 1: Ligne 1:
-====== Installation d'Etherpad-Lite ====== 
-sources : [[http://www.unixgarden.com/index.php/gnu-linux-magazine/node-js-du-javascript-sur-votre-serveur|http://www.unixgarden.com/index.php/gnu-linux-magazine/node-js-du-javascript-sur-votre-serveur]]\\ 
-[[https://github.com/ether/etherpad-lite/wiki|https://github.com/ether/etherpad-lite/wiki]]\\  
-[[https://help.ubuntu.com/community/Etherpad-liteInstallation|https://help.ubuntu.com/community/Etherpad-liteInstallation]]\\  
-[[http://jeyg.info/etherpad-lite/|http://jeyg.info/etherpad-lite/]]\\  
-[[http://geekdefrance.fr/2012/05/09/tuto-installation-dune-solution-de-collaboration-etherpad-lite/|http://geekdefrance.fr/2012/05/09/tuto-installation-dune-solution-de-collaboration-etherpad-lite/]]\\  
-[[http://ypcs.fi/howto/2012/10/09/nodejs-debian/|http://ypcs.fi/howto/2012/10/09/nodejs-debian/]] 
- 
-===== Pré requis ===== 
- 
- 
-Installation d'un serveur LAMP sur Debian 7 
- 
- 
-===== Installer les dépendances ===== 
- 
- 
-Installer gzip, git, curl, libssl develop libraries, python et gcc 
- 
- 
-<code> 
-aptitude install gzip git-core curl python libssl-dev pkg-config build-essential 
-</code> 
- 
- 
-===== Installer node.js ===== 
- 
- 
-Télécharger les sources 
- 
- 
-<code> 
-wget http://nodejs.org/dist/latest/node-v0.10.12.tar.gz 
-</code> 
- 
- 
-Extraire l'archive 
- 
- 
-<code> 
-tar zxvf node-v0.10.12.tar.gz 
-</code> 
- 
- 
-Se positionner dans le repertoire décompressé 
- 
- 
-<code> 
-cd node-v0.10.12 
-</code> 
- 
- 
-Créer le répertoire **node** dans **/opt**  
-<code> 
-mkdir /opt/node 
-</code> 
- 
- 
-Compiler et installer 
- 
- 
-<code> 
-./configure --prefix=/opt/node 
-make 
-make install 
-echo 'export PATH=$PATH:/opt/node/bin'>> ~/.profile 
-echo 'export NODE_PATH=/opt/node:/opt/node/lib/node_modules'>> ~/.profile 
-source ~/.profile 
-</code> 
- 
- 
-Tester 
- 
- 
-<code> 
-echo "console.log('Hello World');" | node 
-</code> 
- 
- 
-===== Installer Etherpad-lite ===== 
- 
- 
-Se placer dans le repertoire où l'on desire installer Etherpad Lite 
- 
- 
-<code> 
-cd /usr/share 
-git clone git://github.com/ether/etherpad-lite.git 
-</code> 
- 
- 
-se positionner dans le nouveau répertoire etherpad-lite 
- 
- 
-<code> 
-cd /usr/share/etherpad-lite 
-</code> 
- 
- 
-Installer les dépendances 
- 
- 
-<code> 
-bin/installDeps.sh 
-</code> 
- 
- 
-lancer Etherpad Lite 
- 
- 
-<code> 
-bin/run.sh 
-</code> 
- 
- 
-Se connecter sur [[http://ip_du_serveur:9001|http://ip_du_serveur:9001]]\\  
-La page de création de Pad doit s'afficher 
- 
- 
-===== Lancer comme service ===== 
- 
- 
-créer l'utilisateur etherpad-lite 
- 
- 
-<code> 
-useradd etherpad-lite 
-chown -R etherpad-lite /usr/share/etherpad-lite 
-</code> 
- 
- 
-créer le réperetoire pour les logs /var/log/etherpad-lite 
- 
- 
-<code> 
-mkdir /var/log/etherpad-lite 
-</code> 
- 
- 
-ainsi que le fichier log 
- 
- 
-<code> 
-touch /var/log/etherpad-lite/etherpad-lite.log 
-</code> 
- 
- 
-Modifier les droits 
- 
- 
-<code> 
-chown -R etherpad-lite /var/log/etherpad-lite 
-</code> 
- 
- 
-Créer le fichier de rotation des log 
- 
- 
-<code> 
-nano /etc/logrotate.d/etherpad-lite 
-</code> 
- 
- 
-et copier les lignes: 
- 
- 
-<code> 
-/var/log/etherpad-lite/*.log 
-{ 
-        rotate 4 
-        weekly 
-        missingok 
-        notifempty 
-        compress 
-        delaycompress 
-        sharedscripts 
-        postrotate 
-                restart etherpad-lite>/dev/null 2>&1 || true 
-        endscript 
-} 
-</code> 
- 
- 
-Créer le script de démarrage /etc/init.d/etherpad-lite 
- 
- 
-<code> 
-nano /etc/init.d/etherpad-lite 
-</code> 
- 
- 
-et copier les lignes: 
- 
- 
-<code> 
-#!/bin/sh 
- 
-### BEGIN INIT INFO 
-# Provides:          etherpad-lite 
-# Required-Start:    $local_fs $remote_fs $network $syslog 
-# Required-Stop:     $local_fs $remote_fs $network $syslog 
-# Default-Start:     2 3 4 5 
-# Default-Stop:      0 1 6 
-# Short-Description: starts etherpad lite 
-# Description:       starts etherpad lite using start-stop-daemon 
-### END INIT INFO 
- 
-PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin" 
-LOGFILE="/var/log/etherpad-lite/etherpad-lite.log" 
-EPLITE_DIR="/usr/share/etherpad-lite" 
-EPLITE_BIN="bin/safeRun.sh" 
-USER="etherpad-lite" 
-GROUP="etherpad-lite" 
-DESC="Etherpad Lite" 
-NAME="etherpad-lite" 
- 
-set -e 
- 
-. /lib/lsb/init-functions 
- 
-start() { 
-  echo "Starting $DESC... " 
-   
-  start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true 
-  echo "done" 
-} 
- 
-#We need this function to ensure the whole process tree will be killed 
-killtree() { 
-    local _pid=$1 
-    local _sig=${2-TERM} 
-    for _child in $(ps -o pid --no-headers --ppid ${_pid}); do 
-        killtree ${_child} ${_sig} 
-    done 
-    kill -${_sig} ${_pid} 
-} 
- 
-stop() { 
-  echo "Stopping $DESC... " 
-   while test -d /proc/$(cat /var/run/$NAME.pid); do 
-    killtree $(cat /var/run/$NAME.pid) 15 
-    sleep 0.5 
-  done 
-  rm /var/run/$NAME.pid 
-  echo "done" 
-} 
- 
-status() { 
-  status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $? 
-} 
- 
-case "$1" in 
-  start) 
-   start 
-   ;; 
-  stop) 
-    stop 
-   ;; 
-  restart) 
-   stop 
-   start 
-   ;; 
-  status) 
-   status 
-   ;; 
-  *) 
-   echo "Usage: $NAME {start|stop|restart|status}">&2 
-   exit 1 
-   ;; 
-esac 
- 
-exit 0 
-</code> 
- 
- 
-Rendre le script executable 
- 
- 
-<code> 
-chmod +x /etc/init.d/etherpad-lite 
-</code> 
- 
- 
-Activer le script au démarrage 
- 
- 
-<code> 
-update-rc.d etherpad-lite defaults 
-</code> 
- 
- 
-Démarrer le service 
- 
- 
-<code> 
-/etc/init.d/etherpad-lite start 
-</code> 
- 
- 
-===== Import / Export ===== 
- 
- 
-Installer Abiword 
- 
- 
-<code> 
-aptitude install abiword 
-</code> 
- 
- 
-Dans le fichier **/usr/share/etherpad-lite/settings.json**, remplacer : 
-<code> 
-"abiword" : null, 
-</code> 
- 
- 
-par 
- 
- 
-<code> 
-"abiword" : "/usr/bin/abiword", 
-</code> 
- 
- 
-Redémarrer Etherpad-Lite 
- 
- 
-<code> 
-/etc/init.d/etherpad-lite restart 
-</code> 
- 
- 
-===== Changer le type de base de données (passage sur MySQL) ===== 
- 
- 
-La base données utilisée par défaut (dirty.db) n'est pas recommandé. 
- 
- 
-Création de la base MySQL 
- 
- 
-<code> 
-mysql -u root -p 
- 
-create database etherpadlite; 
- 
-grant all privileges on etherpadlite.* to etherpadlite@localhost identified by 'mot_de_passe' with grant option; 
- 
-flush privileges; 
- 
-quit 
-</code> 
- 
- 
-Dans le fichier **/usr/share/etherpad-lite/settings.json**, dans la section base de données, remplacer : 
-<code> 
-  "dbType" : "dirty", 
-  //the database specific settings 
-  "dbSettings" : { 
-                   "filename" : "var/dirty.db" 
-                 }, 
-</code> 
- 
- 
-par 
- 
- 
-<code> 
- "dbType" : "mysql", 
-   "dbSettings" : { 
-                    "user"    : "etherpadlite",  
-                    "host"    : "localhost",  
-                    "password": "mot_de_passe",  
-                    "database": "etherpadlite" 
-                  }, 
-</code> 
- 
- 
-Redémarrer Etherpad Lite 
- 
- 
-<code> 
-/etc/init.d/etherpad-lite restart 
-</code> 
- 
- 
-Se connecter à un pad ([[http://ip_du_serveur:9001|http://ip_du_serveur:9001]]) puis le refermer. 
- 
- 
-Revenir dans MySQL 
- 
- 
-<code> 
-mysql -u root -p 
-ALTER DATABASE `etherpadlite` CHARACTER SET utf8 COLLATE utf8_bin; 
-USE `etherpadlite`; 
-ALTER TABLE `store` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; 
-exit 
-</code> 
- 
- 
-Redémarrer Etherpad Lite 
- 
- 
-<code> 
-/etc/init.d/etherpad-lite restart 
-</code> 
- 
- 
-===== Plugins ===== 
- 
- 
-==== Manuellement ==== 
- 
- 
-Se positionner dans le répertoire **/opt/etherpad/local/etherpad/etherpad-lite/**  
-<code> 
-cd /opt/etherpad/local/etherpad/etherpad-lite/ 
-</code> 
- 
- 
-Pour installer un plugin 
- 
- 
-<code> 
-npm install ep_*nom_du_plugin* 
-</code> 
- 
- 
-Pour désinstaller un plugin 
- 
- 
-<code> 
-npm uninstall ep_*nom_du_plugin* 
-</code> 
- 
- 
-Pour mettre à jour un plugin 
- 
- 
-<code> 
-npm install --upgrade ep_*nom_du_plugin* 
-</code> 
- 
- 
-Redémarrer Etherpad Lite 
- 
- 
-<code> 
-/etc/init.d/etherpad-lite restart 
-</code> 
- 
- 
-==== A partir de l'interface web ==== 
- 
- 
-Pour activer l'intreface web d'administration des plugins, remplacer dans le fichier **/usr/share/etherpad-lite/settings.json** : 
-<code> 
-  /* Require authorization by a module, or a user with is_admin set, see below. */ 
-  "requireAuthorization": false, 
- 
-  /* Users for basic authentication. is_admin = true gives access to /admin. 
-     If you do not uncomment this, /admin will not be available! */ 
-  /* 
-  "users": { 
-    "admin": { 
-      "password": "changeme1", 
-      "is_admin": true 
-    }, 
-    "user": { 
-      "password": "changeme1", 
-      "is_admin": false 
-    } 
-  }, 
-  */ 
-</code> 
- 
- 
-par 
- 
- 
-<code> 
-  /* Require authorization by a module, or a user with is_admin set, see below. */ 
-  "requireAuthorization": true, 
- 
-  /* Users for basic authentication. is_admin = true gives access to /admin. 
-     If you do not uncomment this, /admin will not be available! */ 
- 
-  "users": { 
-    "admin": { 
-      "password": "mot_de_passe", 
-      "is_admin": true 
-    }, 
-    "user": { 
-      "password": "mot_de_passe", 
-      "is_admin": false 
-    } 
-  }, 
-</code> 
  
etherpad-lite_install.1373920182.txt.gz · Dernière modification: 2013/07/22 18:36 (modification externe)