KvFG Wiki

Karl-von-Frisch-Gymnasium Dußlingen

Benutzer-Werkzeuge

Webseiten-Werkzeuge


sonstiges:archiv:computer:karlchen:etherpad

Etherpad und Ethercalc

Voraussetzung für die Installation von EP Servern auf Ubuntu 12.04 ist ein node.js Server. Die Installation von node.js erfolgt im Rahmen der Installation von Etherpad.

Etherpad

Zuerst wird ein Benutzer etherpad ins System gebracht, unter dessen Account der Server später läuft:

sudo adduser --system --home=/opt/etherpad --group etherpad

Dann werden die Abhängigkeiten installiert:

sudo apt-get install gzip git-core curl python libssl-dev build-essential abiword python-software-properties

Die Serverkomponente wird aus dem Benutzerkontext des Accounts etherpad installiert:

sudo su - etherpad -s /bin/bash 

mkdir ~/local

cd ~/local
                                                                                            
wget http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz

tar -zxvf  node-v0.8.7.tar.gz

cd node-v0.8.7

./configure –-prefix=$HOME/local/node

make

In einem weiteren Terminal (das andere nicht zumachen) als root:

cd /opt/etherpad/local/node-v0.8.7
make install

Im ersten Terminal (im Kontext etherpad):

echo ‘export PATH=$HOME/local/node/bin:$PATH’ >> ~/.profile
echo ‘export NODE_PATH=$HOME/local/node:$HOME/local/node/lib/node_modules’ >> ~/.profile
source ~/.profile

curl -s https://npmjs.org/install.sh > npm-install-$$.sh

Jetzt erfolgt die Installation von Etherpad selbst:

sudo su - etherpad -s /bin/bash 

mkdir ~/local

mkdir ~/local/etherpad

cd ~/local/etherpad

git clone git://github.com/ether/etherpad-lite.git

cd etherpad-lite

bin/run.sh 
  

Der Server sollte nun auf Port 9001 zu erreichen sein.

Wir brauchen noch ein paar Startskripte. Für die folgenden Schritte nehmen wir das Terminal von root:

mkdir /var/log/etherpad-lite

chown etherpad /var/log/etherpad-lite

chown -R etherpad /var/log/etherpad-lite

vi /etc/init/etherpad-lite.conf

Hier dann den folgenden Code hinwerfen:

description "etherpad-lite"


start on started networking
stop on runlevel [!2345]

env EPHOME=/opt/etherpad/local/etherpad/etherpad-lite
env EPLOGS=/var/log/etherpad-lite
env EPUSER=etherpad


pre-start script
    cd $EPHOME
    mkdir $EPLOGS                              ||true
    chown $EPUSER:admin $EPLOGS                ||true
    chmod 0755 $EPLOGS                         ||true
    chown -R $EPUSER:admin $EPHOME/var         ||true
    $EPHOME/bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; }
end script

script
  cd $EPHOME/
  exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node node_modules/ep_etherpad-lite/node/server.js \
                        >> $EPLOGS/access.log \
                        2>> $EPLOGS/error.log
end script

Die Logs müssen auch rotiert werden:

vi /etc/logrotate.d/etherpad-lite

Hier dann einfügen:

/var/log/etherpad-lite/*.log
{
        rotate 4
        weekly
        missingok
        notifempty
        compress
        delaycompress
        sharedscripts
        postrotate
                restart etherpad-lite >/dev/null 2>&1 || true
        endscript
}

Ein sudo start etherpad-lite bringt den Server hoch.

Quelle: https://help.ubuntu.com/community/Etherpad-liteInstallation

Ethercalc

Ist der Etherpadserver einmal in Betrieb ist Ethercalc schnell installiert:

sudo su – etherpad -s /bin/bash

cd /opt/etherpad/local

mkdir ethercalc
cd ethercalc

npm install ethercalc

Ein erster Start:

./node_modules/ethercalc/bin/ethercalc

Strg C beendet den Server auf Port 8000.

Als root:

cd /etc/initd

vi ethercalc.conf

Hier den folgenden Code einfügen:

    description “ethercalc”

    start on started networking

    stop on runlevel [!2345]

    env ECHOME=/opt/etherpad/local/ethercalc

    env ECLOGS=/var/log/ethercalc

    env ECUSER=etherpad

    # Programpath /opt/etherpad/local/ethercalc/node_modules/ethercalc/bin/ethercalc

    pre-start script

    chown -R $ECUSER $ECLOGS ||true

    chmod -R 755 $ECLOGS ||true

    end script

    script

    cd $ECHOME/

    exec su -s /bin/sh -c ‘exec “$0″ “$@”‘ $ECUSER — node_modules/ethercalc/bin/ethercalc \

    >> $ECLOGS/access.log \

    2>> $ECLOGS/error.log

    end script

Die Verzeichnisse für die Logs anlegen und dem Benutzer etherpad übergeben:

  mkdir /var/log/ethercalc
  chmod -R 755 /var/log/ethercalc
  chown -R etherpad /var/log/ethercalc

Die Logs müssen auch weg-rotated werden. Also

  vi /etc/logrotate.conf

und hier am Ende hinzufügen:

    # Ethercalc – weekly rotation and compression

    /var/log/ethercalc/*.log {

    weekly

    missingok

    rotate 8

    compress

    notifempty

    }
Unsere Webseite verwendet nur Cookies, die technisch notwendig sind und keine Informationen an Dritte weitergeben. Für diese Cookies ist keine Einwilligung erforderlich. Weitere Informationen finden Sie in unserer Datenschutzerklärung: Weitere Information
sonstiges/archiv/computer/karlchen/etherpad.txt · Zuletzt geändert: 2020/08/27 10:56 von d.weller