Installing Etherpad on Debian

IMPORTANT NOTE: ETHERPAD HAS BEEN REPLACED BY ETHERPAD LITE. YOU SHOULD FOLLOW THIS GUIDE.

IMPORTANT NOTE: THIS DOCUMENTATION IS NOW DATED.  You can now install Etherpad from apt.

Installing Etherpad 1.0.1 with APT

Add the following line as a source in your graphical package manager (In Ubuntu: System->Administration->Synaptic package manager; then Settings->Repositories and then finally Third party software), or edit the file /etc/apt/sources.list and add it there.

deb http://apt.etherpad.org all .
apt-get update
apt-get install etherpad

Answer the questions (if any, depends on your system settings)

/etc/init.d/etherpad start

Other Linux distributions
Download the .tgz and unpack it
Follow instructions in README 🙂

BELOW IS THE OLD GUIDE for Etherpad V1 released by Google

Install prereqs

echo "deb http://ftp.de.debian.org/debian sid main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install sun-java6-jdk

If the above fails then do not continue.  The output of

java -version

Should read..

java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
apt-get install scala mysql-server libmysql-java mercurial

Paste the below to /etc/profile

export PATH
export JAVA_HOME="/usr/lib/jvm/java-6-sun"
export SCALA_HOME="/usr/share/java"
export JAVA="/usr/bin/java"
export SCALA="/usr/bin/scala"
export PATH="/usr/bin:/usr/bin:/usr/local/mysql/bin:$PATH"
export MYSQL_CONNECTOR_JAR="/usr/share/java/mysql-connector-java-5.1.10.jar"
export JAVA_HOME SCALA_HOME JAVA SCALA MYSQL_CONNECTOR_JAR PATH
umask 022

Download the etherpad source to /usr/local/etherpad

hg clone https://etherpad.googlecode.com/hg/ /usr/local/etherpad

Set the environment variables

export JAVA_HOME="/usr/lib/jvm/java-6-sun"
export SCALA_HOME="/usr/share/java"
export JAVA="/usr/bin/java"
export SCALA="/usr/bin/scala"
export PATH="/usr/bin:/usr/bin:/usr/local/mysql/bin:$PATH"
export MYSQL_CONNECTOR_JAR="/usr/share/java/mysql-connector-java-5.1.10.jar"

Add your domain to the superdomain section


nano /usr/local/etherpad/trunk/etherpad/src/etherpad/globals.js

Search for etherpad.com and replace it with your domain (confused? You will figure it out)

Create the etherpad mysql db and privelidges

mysql -u root -p

Enter your password when prompted

create database etherpad;
grant all privileges on etherpad.* to 'etherpad'@'localhost' identified by 'password';
quit
cd /usr/local/etherpad/trunk/etherpad/
ln -s /usr/share/java /usr/share/java/lib
bin/rebuildjar.sh
bin/run-local.sh

Wait quite a while while it builds.

Test by browsing to your server at http://hostnameofserver:9000

Making pro work…

Make sure it doesn’t redirect to etherpad.com for pro

Edit /usr/local/etherpad/trunk/etherpad/src/main.js

Replace all instances of Etherpad.com with yourdomain.com

Edit /usr/local/etherpad/trunk/etherpad/src/static/crossdomain.xml

Add to the obvious section


<allow-access-from domain="yourdomain.com" to-ports="*"/>

<allow-access-from domain="*.yourdomain.com" to-ports="*"/>

Edit /usr/local/etherpad/trunk/etherpad/src/etherpad/pro/pro_utils.js

Replace

var fromDomain = 'etherpad.com';

with

var fromDomain = 'yourdomain.com';

Note: Originally published on the 19th of Dec 2009, Revised on the 10th of March 2010

21 thoughts on “Installing Etherpad on Debian

  1. Great – it works. You have a typo, though. Should be
    apt-get install sun-java6-jdk scala mysql-server libmysql-java mercurial

    Have you made the pro (login) version work?

  2. Thanks for spotting the typo.

    I'm working on getting the rest of Pro working now, follow my blog for a record of what I do.

  3. tnx worked for me on lenny+testing (not sid) with one change
    export MYSQL_CONNECTOR_JAR="/usr/share/java/mysql-connector-java.jar"
    ie no version numbers

  4. I am trying to install it but am having some errors…
    Do you know why I can't find appjet.jar?
    I'm running Ubuntu 9.10

    bin/rebuildjar.sh
    using JAR echo ../lib/*.jar…
    unzipping JARs…
    ../lib/*.jar xf /usr/share/java/scala-library.jar
    ../lib/*.jar xf ../../lib/activation.jar
    ../lib/*.jar xf ../../lib/c3p0-0.9.1.2.jar
    ../lib/*.jar xf ../../lib/commons-lang-2.4.jar
    ../lib/*.jar xf ../../lib/derby-10.5.1.1.jar
    ../lib/*.jar xf ../../lib/derbytools.jar
    ../lib/*.jar xf ../../lib/dnsjava-2.0.6.jar
    ../lib/*.jar xf ../../lib/jetty-6.1.20.jar
    ../lib/*.jar xf ../../lib/jetty-sslengine-6.1.20.jar
    ../lib/*.jar xf ../../lib/jetty-util-6.1.20.jar
    ../lib/*.jar xf ../../lib/json.jar
    ../lib/*.jar xf ../../lib/mail.jar
    ../lib/*.jar xf ../../lib/mysql-connector-java.jar
    ../lib/*.jar xf ../../lib/rhino-js-1.7r1.jar
    ../lib/*.jar xf ../../lib/sanselan-0.94aj.jar
    ../lib/*.jar xf ../../lib/servlet-api-2.5-20081211.jar
    ../lib/*.jar xf ../../lib/tagsoup-1.2.jar
    ../lib/*.jar xf ../../lib/yuicompressor-2.4-appjet.jar
    making cached JAR….
    ../lib/*.jar -cfm appjet.jar ../../lib/manifest .
    mv: cannot stat `appjet.jar': No such file or directory

  5. I’ve followed your guide to get pro to work, but unfortunately it still doesn’t work. I can create a new project, create a password and log in (i could to this even before i found your guide) but after i log in i just get a lot of java errors. Are you sure you didn’t change anything else than domains?

  6. root@XXX /usr/local/etherpad/trunk/etherpad [19]# bin/rebuildjar.sh
    using JAR jar…
    cp: cannot stat `/usr/share/java/mysql-connector-java-5.1.10.jar’: No such file or directory

    Do you know where to find this file?

  7. I was using lenny, I changed the export of the mysql connector to:

    export MYSQL_CONNECTOR_JAR=”/usr/share/java/mysql-connector-java-5.1.6.jar”

    But then I had another error:

    root@100 /usr/local/etherpad/trunk/etherpad [58]# bin/run-local.sh
    Using config file: ./etc/etherpad.localdev-default.properties
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.

    Any idea?

  8. you should really use the apt- version which doesn’t require this file.

    Search for: Sun Java MySql Connector and grab the jdbc version.

    Also note there is a wiki article for how to get this working without sun java (using open java), not sure on the url, ask in the google groups

  9. Hi. I’ve install Etherpad using the Apt way. It works on localhost:9000 but, every time I try to connect from a PC from my personnal network or from outside (I use Dyndns), it doesn’t work (seem’s ther is something wrong with the coookie that goes out of Etherpad). Have you ever seen that ?

  10. Hi. I found it so…
    I just add into etherpad.localdev-default.properties et etherpad.local.properties, at the end of the line topdomains = , my domains.

    So the line is topdomains = localhost,localhost,localhost.localdomain,mydomain.ishere.org

  11. Pingback: Etherpad | exdc
  12. There is a mistake:
    Startup execution failed with non-200 response: 500
    net.appjet.bodylock.JSRuntimeException: Error while executing: Access denied for user ‘etherpad’@’localhost’ (using password: YES)
    When I run.Why?

  13. Your MySQL is not configured correctly.

    try do:
    mysql -uetherpad -pwhateverpassword

    if that works try add the host flag ie -hlocalhost and see what happens.

  14. Hey there!

    I also have this error coming up:

    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.

    I know somebody already answered to that problem but how i can actually change the xms and xmx settings? I tried to change it in the file run-local.sh but it says that I can’t change it – maybe a permission problem? I’m looking for an answer now for hours but can’t find it – have to say that I’m new to Linux (:

    and could you also tell me what exactly parts should be changed in that file because I find at two sections where it says something about mxram.

    Thank you so much already in advance!

Leave a Reply

Your email address will not be published. Required fields are marked *