22
0
Fork 0
wiki/HowtoEtherpad.md

142 lines
3.7 KiB
Markdown
Raw Normal View History

2016-12-29 11:25:39 +01:00
**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.
* <http://etherpad.org/>
* <https://github.com/ether/etherpad-lite/>
* Statut du package Debian officiel : <http://bugs.debian.org/576998>
## 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 <https://github.com/ether/etherpad-lite/wiki/How-to-deploy-Etherpad-Lite-as-a-service>
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 : <https://github.com/Pita/etherpad-lite/blob/master/README.md>
~~~
# aptitude install gzip git-core curl python libssl-dev build-essential
# apt-get build-dep nodejs=0.6.8~dfsg1-1
$ wget <http://nodejs.org/dist/v0.6.10/node-v0.6.10.tar.gz>
$ tar xvf node-v0.6.10.tar.gz
$ cd node-v0.6.10
$ ./configure && make
# make install
$ git clone <https://github.com/Pita/etherpad-lite.git>
$ 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 '<password>';
~~~
puis :
~~~
"dbType" : "mysql",
"dbSettings" : {
"user" : "etherpad",
"host" : "127.0.0.1",
"password": "<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 <https://github.com/ether/etherpad-lite/wiki/How-to-use-Etherpad-Lite-with-MySQL>
### Reverse Proxy
Avec Nginx :
~~~
server {
listen 80;
server_name pad.example.com;
location / {
proxy_pass <http://127.0.0.1:9001/;>
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_<http_version> 1.1;
}
}
~~~
Voir <https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy>