We can discuss the details later!

This and that.

etherpad FreeBSD

etherpad works very well on FreeBSD. Installing it is pretty straight forward and you can mostly follow "generic" Linux Howtos, but there are some differences, listed here.

update 20.08.2011: added basic rc.d script

update 2010-10-2:

  • make sure you install scala 2.7.7, scala 2.8.0 won't work

  • you don't have to change the EXPORT and cp commands any more, just get redhogs etherpad version from github git clone http://github.com/redhog/pad.git which has some nice additions anyway

/update

Some etherpad Linux Howtos:

install:

  • JDK, I use java/jdk16
  • lang/scala
  • mysql, I use databases/mysql51-server
  • databases/mysql-connector-java
  • shells/bash
  • devel/mercurial

since some of the scripts use #!/bin/shell I do ln -s /usr/local/bin/bash /bin/bash ` otherwise you can just grep through the source later and replace all #!/bin/bash with #!/usr/local/bin/bash

make sure that CP_CMD="/bin/cp -R -n" in etherpad/trunk/infrastructure/bin/compilecache.sh i.e. by replacing Darwin with FreeBSD in line 18 or just change line 17.

the exports are:

export JAVA_HOME="/usr/local/diablo-jdk1.6.0"
export SCALA_HOME="/usr/local/share/scala-2.7.7"
export JAVA="$JAVA_HOME/bin/java"
export SCALA="$SCALA_HOME/bin/scala"
export PATH="$JAVA_HOME/bin:$SCALA_HOME/bin:/usr/local/mysql/bin:$PATH"
export MYSQL_CONNECTOR_JAR="/usr/local/share/java/classes/mysql-connector-java.jar"

you might consider to add an etherpad user.

for reaching etherpad through port 80 I use apache's mod_proxy. The configurations I found didn't work for me, this did:

ServerName yourdomain.tld
ServerSignature Off

ErrorLog /var/log/apache2/yourdomain.tld/error.log
LogLevel warn
CustomLog /var/log/apache2/yourdomain.tld/access.log combined

ProxyRequests Off

  Order deny,allow
  Allow from all

ProxyPass / http://localhost:9000/
ProxyPassReverse / http://localhost:9000/
ProxyPreserveHost on

don't forget to load mod_proxy and mod_proxy_http

LoadModule proxy_module libexec/apache2/mod_proxy.so
LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so

if you are using apache2 and don't have mod_proxy installed, just make it again with WITH_PROXY_MODULES=yes

cd /usr/ports/www/apache20
make WITH_PROXY_MODULES=yes
make deinstall
make reinstall

Here is a very basic rc.d script (can only start etherpad). You have to change the path to your etherpad installation.

!/bin/sh
#

# PROVIDE: etherpad
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable etherpad:
#
# etherpad_enable="YES"
#

. /etc/rc.subr

name="etherpad"
rcvar=${name}_enable


start_cmd="${name}_start"
#stop_cmd="${name}_stop"

load_rc_config $name

etherpad_user="etherpad"
procname="java"


pidfile=/var/run/etherpad/etherpad.pid
daemon_args=" -c -f /path/to/etherpad/bin/run.sh"
etherpad_start()
{
    su -l ${etherpad_user} -c "/usr/sbin/daemon ${daemon_args}"
}

run_rc_command "$1"