Requirements:
- Java 1.6
- Scala 2.7
- MySQL Server 5.1
- mysql-connector-java
- etherpad (If you need already cooked etherpad, feel free to ask me. I will email you)
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 scala-2.7.7.final.tgz
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/scala-2.7.7.final/
export SCALA=$SCALA_HOME/bin/scala
export PATH=$JAVA_HOME/bin:$SCALA_HOME/bin:$PATH
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"
#mysql
>create database etherpad;
>grant all privileges on etherpad.* to 'etherpad'@'localhost' identified by 'password';
>exit;
9. Extract the content of etherpad in /etherpad directory.
#cd /etherpad/trunk/etherpad
#cd /bin
#vi rebuildjar.sh
We need to modify rebuildjar.sh as it fails to find the location of 'Infrastructure' directory
Change
source ../infrastructure/bin/compilecache.sh
to
source ../../infrastructure/bin/compilecache.sh
Change
cd ../infrastructure
to
cd ../../infrastructure
Also modify some other files
etherpad/trunk/etherpad# cp etc/etherpad.localdev-default.properties bin/data/etherpad.local.properties
etherpad/trunk/etherpad# cat bin/data/etherpad.local.properties
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 = 127.0.0.1:9000
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
var SUPERDOMAINS = {
'localbox.info': true,
'localhost': true,
'127.0.0.1': true
};
#vi etherpad\trunk\etherpad\src\etherpad\pro\pro_utils.js
var fromDomain = '127.0.0.1';
#vi etherpad\trunk\etherpad\src\main.js
var newurl = "http://127.0.0.1"+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# ./rebuiljar.sh
etherpad/trunk/etherpad/bin#./run-local.sh
12. Then go to http://127.0.0.1:9000, 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 127.0.0.1 with your server IP address in all the files mentioned above, you can access Etherpad using http://your-ip-address:9000/
Links:
http://code.google.com/p/etherpad/wiki/Instructions
http://pauleira.com/13/installing-etherpad/
http://karteek.selfdabba.com/post/301488675/etherpad-opensourced
2 comments:
The latest etherpad source is available at etherpad.org
Thanks for the information John.
Post a Comment