This page is applicable to Ubuntu versions 10.04, 10.10, 11.04 11.10 and 12.04

Etherpad-lite

Etherpad lite is a real time collaborative editor which allows multiple users to simultaneously work with the same document.

prerequisites

First we have to create the Etherpad user.

In terminal type:

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

This is a “system” user. It is there to own and run the application,gets a UID below 1000, has no shell and has logins disabled.

note:

I choose /opt for the program location in order to keep things clean if you change that make sure to alter accordingly some of the instructions and configuration files below

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

Install node.js and npm (easy way)

Node.js is a software system designed for writing highly scalable Internet applications, notably web servers. Programs are written in JavaScript, using event-driven, asynchronous I/O to minimize overhead and maximize scalability.

npm is a package manager for node. You can use it to install and publish your node programs.

In terminal type:

sudo add-apt-repository ppa:chris-lea/node.js

sudo apt-get update

sudo apt-get install nodejs

Install node.js and npm (from source)

Node.js

From http://nodejs.org find the latest stable release and change version accordingly.

In terminal type:

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

Open a new terminal with out closing the other one and type:

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

make install

Close it and return to the first terminal and type:

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

NPM

In terminal type:

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

Others

In terminal, type:

sudo npm install zeparser

Install and run Etherpad Lite

In new terminal type:

sudo su - etherpad -s /bin/bash 

mkdir -p ~/local/etherpad

cd ~/local/etherpad

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

cd etherpad-lite

bin/run.sh 

Without closing the terminal open your favorite browser in http://localhost:9001/ or http://0.0.0.0:9001/

You should be able to see this

etherpad.png

Etherpad Lite as a service(upstart)

We need to get Etherpad Lite running as a service, so that it will be available when your server starts up.

In new terminal type:

sudo mkdir /var/log/etherpad-lite

sudo chown etherpad /var/log/etherpad-lite

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

sudo gedit /etc/init/etherpad-lite.conf

In the editor copy and paste the following.

Make sure to set EPHOME and EPUSER to the proper values if you changed any of them

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

then save and close the editor

In terminal type:

sudo start etherpad-lite

Log rotation

Launch any text editor you like to create the config file for logrotate:

sudo gedit /etc/logrotate.d/etherpad-lite

Copy and paste the following, save then exit.

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

You can check with:

logrotate -d /etc/logrotate.d/etherpad-lite

Plugins

There are many available plugins, you can check them in https://github.com/ether/etherpad-lite/wiki/Available-Plugins

Manually

In terminal type:

cd /opt/etherpad/local/etherpad/etherpad-lite/

in order to install a plugin type:

npm install ep_*name*

sudo restart etherpad-lite

in order to uninstall a plugin type:

npm uninstall ep_*name*

in order to update a plugin type:

npm install --upgrade ep_*name*

In terminal type:

sudo restart etherpad-lite

From browser

In order to configure this functionality we have to setup an admin user.

In terminal type:

sudo gedit /opt/etherpad/local/etherpad/etherpad-lite/settings.json

In the editor change

  /* Require authorization by a module, or a user with is_admin set, see below. */
  "requireAuthorization": false,

  /* Users for basic authentication. is_admin = true gives access to /admin.
     If you do not uncomment this, /admin will not be available! */
  /*
  "users": {
    "admin": {
      "password": "changeme1",
      "is_admin": true
    },
    "user": {
      "password": "changeme1",
      "is_admin": false
    }
  },
  */

with

  /* Require authorization by a module, or a user with is_admin set, see below. */
  "requireAuthorization": true,

  /* Users for basic authentication. is_admin = true gives access to /admin.
     If you do not uncomment this, /admin will not be available! */
  
 "users": {
    "admin": {
      "password": "yourpassword",
      "is_admin": true
    },
    "user": {
      "password": "yourpassword",
      "is_admin": true
    }
  },

then save and close the editor.

In terminal type:

sudo restart etherpad-lite

Now open your favorite browser in http://localhost:9001/admin/plugins

note:

In both ways each time we have to issue "sudo restart etherpad-lite" in order to activate the plugins

File formats importing and exporting

Etherpad Lite depends on AbiWord to import and export different file formats such as PDF, ODF and MS Word.

sudo gedit /opt/etherpad/local/etherpad/etherpad-lite/settings.json

In the editor change

"abiword" : null,

with

"abiword" : "/usr/bin/abiword",

then save and close the editor


By default etherpad-lite use's "Dirty.db" to store records but it's not safe for a production enviroment so we need to use a dedicated database.

MySQL

In terminal type:

sudo apt-get install mysql-server mysql-common mysql-client

make sure to provide a root password then type:

mysql -u root -p

create database `etherpad-lite`;

grant all privileges on `etherpad-lite`.* to 'etherpad'@'localhost' identified by 'yourpassword';

exit

then

sudo gedit /opt/etherpad/local/etherpad/etherpad-lite/settings.json

in the editor change

//An Example of MySQL Configuration
  
  "dbType" : "dirty",
  //the database specific settings
  "dbSettings" : {
                   "filename" : "var/dirty.db"
                 },
                 
  /* An Example of MySQL Configuration
   "dbType" : "mysql",
   "dbSettings" : {
                    "user"    : "root", 
                    "host"    : "localhost", 
                    "password": "", 
                    "database": "store"
                  },
  */

with

 "dbType" : "mysql",
   "dbSettings" : {
                    "user"    : "etherpad", 
                    "host"    : "localhost", 
                    "password": "yourpassword", 
                    "database": "etherpad-lite"
                  },

save and close the editor. Open your favorite browser in http://localhost:9001/ in order to run etherpad-lite with our new settings and close it.

In terminal type:

mysql -u root -p

ALTER DATABASE `etherpad-lite` CHARACTER SET utf8 COLLATE utf8_bin;

USE `etherpad-lite`;

ALTER TABLE `store` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;

exit

and that's it.

http://etherpad.org/

https://github.com/ether/etherpad-lite

for comments,questions,requests

http://ubuntuforums.org/showthread.php?t=2045704

Etherpad-liteInstallation (last edited 2014-09-12 11:58:12 by sdaugherty)