**Cette page a été importée automatiquement de notre ancien wiki mais n'a pas encore été révisée.** # HowtoEtherpad Etherpad est un éditeur texte collaboratif en ligne. On utilise désormais la version Etherpad-Lite. * * * Statut du package Debian officiel : ## Installation Debian Jessie : ~~~ # apt install gzip git curl python libssl-dev pkg-config build-essential # apt install nodejs npm # adduser --system --home=/home/etherpad-lite --group etherpad-lite $ git clone git://github.com/ether/etherpad-lite.git # vim /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=/home/etherpad-lite/etherpad-lite/bin/run.sh [Install] WantedBy=multi-user.target # systemctl enable etherpad-lite Created symlink from /etc/systemd/system/multi-user.target.wants/etherpad-lite.service to /etc/systemd/system/etherpad-lite.service. # systemctl start etherpad-lite ~~~ Voir Note : les scripts bin/run.sh et bin/installDeps.sh utilisent la commande "node" et non "nodejs", il peut donc être nécessaire de modifier ou créer un alias node=nodejs ### Installation (deprecated) En installant nodejs depuis les sources. Suivre les infos sur : ~~~ # aptitude install gzip git-core curl python libssl-dev build-essential # apt-get build-dep nodejs=0.6.8~dfsg1-1 $ wget $ tar xvf node-v0.6.10.tar.gz $ cd node-v0.6.10 $ ./configure && make # make install $ git clone $ cd ../etherpad-lite/ $ ./bin/installDeps.sh $ vim settings.json $ ./bin/run.sh ~~~ Lancer bin/run.sh ## Configuration Cela ce passe dans _settings.json_ ### Stockage des données Par défaut, Etherpad utilise DirtyDB (un fichier à plat) mais on peut utiliser sqlite ou MySQL. Pour DirtyDB : ~~~ "dbType" : "dirty", "dbSettings" : { "filename" : "var/dirty.db" }, ~~~ Pour MySQL utiliser MySQL : ~~~ mysql> create database etherpad; mysql> grant CREATE,ALTER,SELECT,INSERT,UPDATE,DELETE on `etherpad`.* to 'etherpad'@'localhost' identified by ''; ~~~ puis : ~~~ "dbType" : "mysql", "dbSettings" : { "user" : "etherpad", "host" : "127.0.0.1", "password": "", "database": "etherpad" }, ~~~ puis : ~~~ $ sh bin/installDeps.sh # systemctl restart etherpad-lite mysql> show tables +--------------------+ | Tables_in_etherpad | +--------------------+ | store | +--------------------+ mysql> ALTER DATABASE `etherpad` CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; mysql> ALTER TABLE `store` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ~~~ Voir ### Reverse Proxy Avec Nginx : ~~~ server { listen 80; server_name pad.example.com; location / { proxy_pass proxy_set_header Host $host; proxy_pass_header Server; proxy_buffering off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_ 1.1; } } ~~~ Voir