Sunday, April 18, 2010

Etherpad installation on SLES or CentOS

Etherpad is online real-time collaborative document editing tool.


Steps to be followed:

1. Create username 'etherpad' with password 'password'

#useradd -r -m etherpad
#passwd etherpad

2. Install MySQL and configure MySQL

--> You can use YAST for SLES and YUM for CentOS

#service mysql start --> in SLES
#service mysqld start --> in CentOS
#chkconfig mysql on --> to enable MySQL on next reboot

3. Once you download Scala 2.7 , extract the tar file to the /usr/local/scala directory.

#mkdir /usr/local/scala
#cd /usr/local/scala
#tar xvzf

4. Once you download mysql-connector-java, extract the tar file to the /usr/local/mysqlconnector

#cd /usr/local
#tar xvzf mysqlconnector.tar.gz

5. Install JAVA 1.6

#sh jdk-6u20-linux-x64-rpm.bin

Use YAST or YUM to install "fastjar"

6. Create myENV file

#touch myENV
#vi myENV
export JAVA_HOME=/usr/java/jdk1.6.0_20/
export JAVA=$JAVA_HOME/bin/java
export SCALA_HOME=/usr/local/scala/
export SCALA=$SCALA_HOME/bin/scala
export MYSQL_CONNECTOR_JAR=/usr/local/mysqlconnector/mysql-connector-java-5.1.12-bin.jar

7. /etc/profile hosts the environment variables

#cat myENV >> /etc/profile

Logout and log back in.

8. Create database called "etherpad" and grant privilege to user "etherpad"

>create database etherpad;
>grant all privileges on etherpad.* to 'etherpad'@'localhost' identified by 'password';

9. Extract the content of etherpad in /etherpad directory.

#cd /etherpad/trunk/etherpad
#cd /bin

We need to modify as it fails to find the location of 'Infrastructure' directory

source ../infrastructure/bin/
source ../../infrastructure/bin/

cd ../infrastructure
cd ../../infrastructure

Also modify some other files

etherpad/trunk/etherpad# cp etc/ bin/data/

etherpad/trunk/etherpad# cat bin/data/
ajstdlibHome = ../../infrastructure/framework-src/modules
appjetHome = ./data/appjet
devMode = false
etherpad.adminPass = password
etherpad.fakeProduction = false
etherpad.isProduction = true
etherpad.SQL_JDBC_DRIVER = com.mysql.jdbc.Driver
etherpad.SQL_JDBC_URL = jdbc:mysql://localhost:3306/etherpad
etherpad.SQL_PASSWORD = password
etherpad.SQL_USERNAME = etherpad
listen =
logDir = ./data/logs
modulePath = ../src
transportPrefix = /comet
transportUseWildcardSubdomains = true
useVirtualFileRoot = ../src

Also need to modify 3 other files

# vi etherpad\trunk\etherpad\src\etherpad\globals.js

'': true,
'localhost': true,
'': true

#vi etherpad\trunk\etherpad\src\etherpad\pro\pro_utils.js

var fromDomain = '';

#vi etherpad\trunk\etherpad\src\main.js

var newurl = ""+request.path;

10. Now we are almost done.
[it is very important that you are inside bin directory of etherpad to run the script files, otherwise you will get error: file location not found or something wrong]
etherpad/trunk/etherpad# cd bin
etherpad/trunk/etherpad/bin# ./

12. Then go to, it will prompt you to create new pad

13. To customize the home page, you can edit the file
# vi etherpad\trunk\etherpad\src\templates\main\home.ejs

14. If you replace with your server IP address in all the files mentioned above, you can access Etherpad using http://your-ip-address:9000/



John McLear said...

The latest etherpad source is available at

Devendra said...

Thanks for the information John.