Etherpad

Differences between revisions 5 and 34 (spanning 29 versions)
Revision 5 as of 2009-12-20 02:19:53
Size: 2327
Editor: pool-96-243-197-55
Comment:
Revision 34 as of 2012-02-15 09:24:13
Size: 4658
Editor: 135
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
== Status of official Ubuntu packages for Etherpad ==
There are no Ubuntu packages for Etherpad available from the repositories yet. If you want to help package Etherpad in Ubuntu see:
 * https://bugs.launchpad.net/debian/+bug/563484
Line 4: Line 7:
== Install packages == This document describes how to install Etherpad from Etherpad.org's repositories or, if you are inclined to do so, building it from its source code and installing it.

= Installing Etherpad from Etherpad.org's repository =

== Install Java, MySQL and Scala required packages ==
Line 9: Line 16:
sudo apt-get install sun-java6-jdk scala libmysql-java mercurial sudo apt-get install sun-java6-jdk scala mysql-server mysql-client libmysql-java git-core
Line 12: Line 19:
== Get Etherpad code == Etherpad will not build or run with openjdk-6-jdk or openjdk-6-jre. It also is best to use Sun's jar since fastjar seems to have some issues.
Line 14: Line 21:
There are no releases of Etherpad at the moment, so we grab directly from mercurial. If you get this error:
{{{
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate
}}}
Checkout /etc/apt/sources.list and add this line if missing:
{{{
deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
}}}
For Lucid you have to activate the partner repository
{{{
deb http://archive.canonical.com/ubuntu lucid partner
}}}
Then
{{{
apt-get update
}}}
and try again.

It is necessary to ensure that the server's host name is in the /etc/hosts for the IP 127.0.0.1 . If this is not there you will have a compile time error like this :

"Unable to establish connection to compilation daemon
       Compilation failed."

Furthermore, it might be necessary to tell Ubuntu to switch from OpenJDK to Sun’s Java:
{{{
update-java-alternatives -s java-6-sun
}}}

== Installing the Etherpad package ==

There is now an apt source that you can put in your /etc/apt/sources.list
http://wiki.github.com/ether/pad/installation-instructions-ii
Line 17: Line 58:
hg clone https://etherpad.googlecode.com/hg/ etherpad sudo echo "deb http://apt.etherpad.org all ." >> /etc/apt/sources.list

sudo echo "deb http://us.archive.ubuntu.com/ubuntu hardy multiverse" >> /etc/apt/sources.list
Line 20: Line 63:
You will need to patch the etherpad code to build on Ubuntu: Then do the following commands
Line 22: Line 65:
diff -r 81287c8af1ac trunk/infrastructure/bin/makejar.sh
--- a/trunk/infrastructure/bin/makejar.sh Fri Dec 18 18:44:23 2009 +1100
+++ b/trunk/infrastructure/bin/makejar.sh Sat Dec 19 09:50:05 2009 -0500
@@ -32,11 +32,11 @@
 
 TMPSTORE=/tmp/ajbuild-tmpstore-`date +%s`
 
-JARFILES=`echo $SCALA_HOME/lib/scala-library.jar lib/*.jar lib/manifest`
+JARFILES=`echo $SCALA_HOME/scala-library.jar lib/*.jar lib/manifest`
 function genjar {
     echo "unzipping JARs..."
     pushd $1 >> /dev/null
- $JAR xf $SCALA_HOME/lib/scala-library.jar
+ $JAR xf $SCALA_HOME/scala-library.jar
     rm -rf META-INF
     for a in ../../lib/*.jar; do
        $JAR xf $a
$sudo apt-get update
$sudo apt-get install etherpad
Line 41: Line 69:
Be sure to add you domain to the list of SUPERDOMAINs: You will get the following message.
Line 43: Line 71:
diff -r 81287c8af1ac trunk/etherpad/src/etherpad/globals.js
--- a/trunk/etherpad/src/etherpad/globals.js Fri Dec 18 18:44:23 2009 +1100
+++ b/trunk/etherpad/src/etherpad/globals.js Sat Dec 19 09:50:05 2009 -0500
@@ -29,6 +29,8 @@
 var SUPERDOMAINS = {
   'localbox.info': true,
   'localhost': true,
+ 'yourdomain.com': true,
+ 'yourdomain.org': true,
   'etherpad.com': true
 };
$ apt-get install etherpad
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  etherpad
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/31.5MB of archives.
After this operation, 45.0MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  etherpad
Install these packages without verification [y/N]?
Line 55: Line 84:
== Configure Environment ==
Type Y because you trust the Etherpad foundation. :)

Now for some mysql magic.
http://dev.mysql.com/doc/refman/4.1/en/adding-users.html

First, you would check if this is necesary to do checking if the user ''etherpad'' already exists.
Line 58: Line 93:
#!sh
export JAVA_HOME=/usr/lib/jvm/java-6-sun/
export SCALA_HOME=/usr/share/java
export MYSQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar
$mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 205
Server version: 5.1.41-3ubuntu12.3 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE etherpad;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'etherpad'@'localhost' IDENTIFIED BY 'some_password_here'
mysql> quit
Bye
$
Line 63: Line 107:
Now the etherpad database is done.
Give yourself a pat on the back.
Now depending on the speed of box server you might want to get a drink right now. Or read http://xkcd.com/ while the code is compiling.
{{{
$cd /usr/share/etherpad
$bin/build.sh
}}}
In your favorite editor or nano
{{{
nano /etc/etherpad/etherpad.local.properties
}}}
Edit the line
topdomains = <YOUR DOMAIN HERE>, Ubuntu,localhost,localhost.localdomain
To include your Fully Qualified Domain Name(FQDN) of your box.
then run
{{{
$sudo bin/run.sh
}}}
YAY You did it.
Be the only kid on your block that has installed etherpad.
Line 64: Line 128:
== Configure MySQL == = Installing Etherpad from source code =
Please note this is not recommended for production systems and will not provide feature and security updates.
Line 66: Line 131:
== Build from source ==
If you want the latest an greatest from the etherpad foundation you have to use git.
Don't worry git is super cool and easy.
Line 67: Line 135:
#!sql
INSERT INTO `user` VALUES ('localhost','etherpad','YOUR_PASSWORD_HASH','N','N','N','N','N','N','N','N','N','N',
'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0);

INSERT INTO `db` VALUES ('localhost','etherpad','etherpad','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y')
$cd ~
$git clone git@github.com:ether/pad.git
Line 73: Line 138:
You should now have a directory with the etherpad source!
Line 76: Line 141:
From trunk/etherpad: From pad/:
Line 78: Line 143:
$ bin/rebuildjar.sh $ bin/build.sh
Line 83: Line 148:
$ bin/run-local.sh $ bin/run.sh

Status of official Ubuntu packages for Etherpad

There are no Ubuntu packages for Etherpad available from the repositories yet. If you want to help package Etherpad in Ubuntu see:

This document describes how to install Etherpad from Etherpad.org's repositories or, if you are inclined to do so, building it from its source code and installing it.

Installing Etherpad from Etherpad.org's repository

Install Java, MySQL and Scala required packages

Install pre-requisite packages for getting and building Etherpad.

sudo apt-get install sun-java6-jdk scala mysql-server mysql-client libmysql-java git-core

Etherpad will not build or run with openjdk-6-jdk or openjdk-6-jre. It also is best to use Sun's jar since fastjar seems to have some issues.

If you get this error:

Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate

Checkout /etc/apt/sources.list and add this line if missing:

deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse

For Lucid you have to activate the partner repository

deb http://archive.canonical.com/ubuntu lucid partner

Then

apt-get update

and try again.

It is necessary to ensure that the server's host name is in the /etc/hosts for the IP 127.0.0.1 . If this is not there you will have a compile time error like this :

"Unable to establish connection to compilation daemon

  • Compilation failed."

Furthermore, it might be necessary to tell Ubuntu to switch from OpenJDK to Sun’s Java:

update-java-alternatives -s java-6-sun

Installing the Etherpad package

There is now an apt source that you can put in your /etc/apt/sources.list http://wiki.github.com/ether/pad/installation-instructions-ii

sudo echo "deb http://apt.etherpad.org all ." >> /etc/apt/sources.list

sudo echo "deb http://us.archive.ubuntu.com/ubuntu hardy multiverse" >> /etc/apt/sources.list

Then do the following commands

$sudo apt-get update
$sudo apt-get install etherpad

You will get the following message.

$ apt-get install etherpad
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  etherpad
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/31.5MB of archives.
After this operation, 45.0MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  etherpad
Install these packages without verification [y/N]? 

Type Y because you trust the Etherpad foundation. Smile :)

Now for some mysql magic. http://dev.mysql.com/doc/refman/4.1/en/adding-users.html

First, you would check if this is necesary to do checking if the user etherpad already exists.

$mysql -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 205
Server version: 5.1.41-3ubuntu12.3 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE etherpad;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'etherpad'@'localhost' IDENTIFIED BY 'some_password_here' 
mysql> quit
Bye
$

Now the etherpad database is done. Give yourself a pat on the back. Now depending on the speed of box server you might want to get a drink right now. Or read http://xkcd.com/ while the code is compiling.

$cd /usr/share/etherpad
$bin/build.sh

In your favorite editor or nano

nano /etc/etherpad/etherpad.local.properties

Edit the line topdomains = <YOUR DOMAIN HERE>, Ubuntu,localhost,localhost.localdomain To include your Fully Qualified Domain Name(FQDN) of your box. then run

$sudo bin/run.sh

YAY You did it. Be the only kid on your block that has installed etherpad.

Installing Etherpad from source code

Please note this is not recommended for production systems and will not provide feature and security updates.

Build from source

If you want the latest an greatest from the etherpad foundation you have to use git. Don't worry git is super cool and easy.

$cd ~
$git clone git@github.com:ether/pad.git

You should now have a directory with the etherpad source!

Compiling Etherpad

From pad/:

$ bin/build.sh

Running Etherpad

$ bin/run.sh

Etherpad (last edited 2012-02-15 09:24:13 by 135)