Etherpad

De WikiMar
Dreceres ràpides: navegació, cerca

Etherpad installation

sudo apt update
sudo apt upgrade
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt install -y nodejs
git clone --branch master https://github.com/ether/etherpad-lite.git && cd etherpad-lite && src/bin/run.sh

We install all plugins:

     npm install --no-save --legacy-peer-deps ep_headings2 ep_markdown ep_comments_page ep_align ep_font_color ep_webrtc ep_embedded_hyperlinks2

We disable webrtc because it requires SSL:

    cd node_modules/
    mv ep_webrtc/ ../..

We add more plugins:

npm i ep_table_of_contents
npm i ep_tables4
npm i ep_image_upload
npm i ep_spellcheck
npm i ep_codepad
npm i ep_prompt_for_name
npm i ep_whiteboard
npm i ep_timestamp
npm i ep_table_of_contents
npm i ep_prompt_for_name
npm i ep_codepad
npm i ep_spellcheck


Whiteboard installation

We install WBO:

cd
git clone https://github.com/lovasoa/whitebophir.git
cd whitebophir/
npm install --production
PORT=1081 npm start

We add to etherpad-lite/settings.json before the last }

 "ep_draw": {
       "host": "10.32.63.245:1081"
  }


Startup script

startup.sh

#!/bin/bash

cd /home/ubuntu/whitebophir 
PORT=1081 npm start >/tmp/whiteboard.txt 2>/tmp/whiteboard2.txt &
cd /home/ubuntu/etherpad-lite
/home/ubuntu/etherpad-lite/src/bin/run.sh >/tmp/etherpad.txt 2>/tmp/etherpad2.txt &


Add to crontab -e

@reboot /home/ubuntu/startup.sh


Restart

killall node
./startup.sh

Personalisation

In settings.json, remove the "Timeslider"

In ./src/templates/pad.html remove the 3 lines for the "About powered by Etherpad" (around line 175)


Running on port 80 as normal user

as root

crontab -e

add:

@reboot /usr/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 1080