Diese Anleitung ist eine erste Hilfestellung und vermutlich noch nicht vollständig.
Voraussetzungen
apt-get install nodejs nodejs-legacy npm curl
Installationsort: /var/www/etherpad
Systembenutzer einrichten
adduser --system --group --no-create-home --home /var/www/etherpad etherpad
Programm herunterladen und installieren
cd /var/www wget https://github.com/ether/etherpad-lite/archive/1.8.0.zip unzip 1.8.0.zip rm 1.8.0.zip ln -s etherpad-lite-1.8.0 etherpad chown -R etherpad etherpad-lite-1.8.0
Datenbank vorbereiten
mysql -u root -p > CREATE DATABASE etherpad; > CREATE USER 'etherpad'@'localhost' IDENTIFIED BY '********'; > GRANT CREATE,ALTER,SELECT,INSERT,UPDATE,DELETE ON etherpad.* TO 'etherpad'@'localhost'; > exit
Kennwort ändern im Fehlerfall
SET PASSWORD FOR 'etherpad'@'localhost' = PASSWORD('new-password-here');
FLUSH PRIVILEGES;
Konfiguration
cd etherpad cp settings.json.template settings.json chown etherpad settings.json
"dbType" : "mysql",
"dbSettings" : {
"user" : "etherpad",
"host" : "localhost",
"password": "********",
"database": "etherpad",
"charset" : "utf8mb4"
},
"loglevel": "WARN",
"users": {
"admin": {
"password": "****",
"is_admin": true
},
"user": {
"password": "****",
"is_admin": false
}
},
Optional: Proxy konfigurieren, falls Etherpad hinter einem Proxy eingerichtet wird
npm config set proxy http://"user:pass"@proxy.example.com:3128 npm config set https-proxy http://"user:pass"@proxy.example.com:3128
Starten, das funktioniert nur, wenn der oben angelegte Benutzer einen Shell-Zugang hat.
Mit dem Eintrag /bin/false geht es nicht!
cd /var/www/etherpad su etherpad -c bin/run.sh
Im Produktivbetrieb sollte das Pad hinter einem echten Webserver betrieben werden, wie z.B. Nginx oder Apache. Dieser muß als Reverse-Proxy konfiguriert werden. Für Nginx z.B.:
server {
listen 80;
server_name pad.example.com;
root html;
index index.html index.htm;
location = / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:9001;
}
}