| « Funambol on JBoss | Getting all Fn keys to work on the Sony Vaio VPCZ2 » |
Installing Funambol and integrating with SOGo
There's a nice HOWTO provided by clearfoundation.com, that walks through the installation of Funambol, and the installation of the SOGo plugin.
I used newer versions for both the funambol (10.0.0) and the sogo integration plugin (1.0.9), but the procedure is exactly the same.
There is however a small error in the procedure, at the end of the walkthrough, with the parameters you have to set with the funambol admin client.
...
the examples use database links like this:jdbc://mysql://localhost/database
..which is an invalid URL. The Funambol admin client doesn't complain when you enter the invalid URL, but the server gets confused and will try instead to use the PostgreSQL driver (even though there's an explicitly configured MySQL driver). I had not installed the PostgreSQL driver, so it threw a NullPointerException at initialization time.
The URL should be (note the two removed slashes after jdbc:)
jdbc:mysql://localhost/database
Tomcat
Funambol ships its own Tomcat installation (and even a Java JRE!), which uses the default portnumber 8080 for its HTTP service. This conflicts with my JBoss installation, so I changed the portnumber where Tomcat listens to HTTP requests to 8081. There's no other Funambol configuration depending on this portnumber, so it's sufficient to change the Connector stanza in /opt/Funambol/tools/tomcat/conf/server.xml to:
<!-- Funambol comment: don't modify or remove this Funambol comment! ##### --><Connector port="8081" protocol="HTTP/1.1"connectionTimeout="20000"redirectPort="8443" />
Debian
As I use debian, and not ClearOS, the init script looks different. Debian puts its init scripts in /etc/init.d, and not /etc/rc.d/init.d. Furthermore, debian uses different headers to indicate the default runlevels the service should run at, and what dependencies should be running before Funambol can run.
My /etc/init.d/funambol looks like this:
#!/bin/bash## /etc/init.d/funambol## Sync Daemon for Contacts, Calendars and Tasks#### BEGIN INIT INFO# Provides: funambol# Required-Start: $remote_fs $network# Required-Stop: $remote_fs $network# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Funambol Sync Service### END INIT INFO
# Source function library.#. /etc/init.d/functions
. /lib/lsb/init-functions
LOCKFILE=/var/lock/funambolNAME=funambol
RETVAL=
start() {log_daemon_msg "Starting $NAME" "$NAME"/opt/Funambol/bin/funambol startRETVAL=$?if [ $RETVAL -eq 0 ]; thentouch $LOCKFILEfilog_end_msg 0}
stop() {log_daemon_msg "Shutting down $NAME" "$NAME"/opt/Funambol/bin/funambol stopRETVAL=$?if [ $RETVAL -eq 0 ]; thenrm -f $LOCKFILEfilog_end_msg 0}
case "$1" instart)start;;stop)stop;;restart|reload)stopstart;;*)echo "Usage: funambol {start|stop|reload|restart}"exit 1;;esac
exit $RETVAL
Finally, I configure to start the service in runlevel 2 (default runlevel on debian), almost at the end of the boot process, and stop it as one of the first services in runlevels 0 and 6 (shutdown and reboot) :
update-rc.d funambol start 98 2 .
update-rc.d funambol stop 02 0 .
update-rc.d funambol stop 02 6 .