Installation of funambol ds v3.0 non-bundled version on Debian 3.1

The funambol ds server administration guide is available from http://www.funambol.org. I recommend to read it first. Considering the guide there are three prerequisites for the installation:

Prerequisite #1: Java SDK

First, the Java™ SDK (e.g jdk-1_5_0_09-linux-i586.bin) has to be downloaded from http://java.sun.com. It's a good idea to install it as a Debian package to let your package management system know, that Java™ ist installed, see: JavaPackage

At this point we can make the included Java™ plugin available to Firefox webbrowser

# cd /usr/lib/mozilla-firefox/plugin
# ln -s /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so

Starting the funambol server further on will require the environment variable JAVA_HOME set to the installation path of the Java™ SDK, so we add the following to /etc/bash.bashrc

# if JavaSDK exists, set the environment variable
if [ -d /usr/lib/j2sdk1.5-sun ]; then
    JAVA_HOME="/usr/lib/j2sdk1.5-sun"
    export JAVA_HOME
fi

Prerequisite #2: tomcat 5 application server

The second prerequisite is the tomcat 5 application server. Unfortunately Debian 3.1 has tomcat 4 available as a package for stable - tomcat 5 is only available in unstable and testing. To get it, we have to tell the package management system, that our installation should remain stable, while we install some packages from the unstable tree. Create /etc/apt/apt.conf that contains the following entry:

APT::Default-Release "stable";

After adding "unstable" to /etc/apt/sources.list we can install tomcat 5

# apt-get -t unstable install tomcat5

To complete the installation, we edit /etc/default/tomcat5 , change the path in the following line to the Java™ SDK and uncomment the line:

JAVA_HOME=/usr/lib/j2sdk1.5-sun

Prerequisite #3: mysql DBMS

The mysql DBMS can be easily installed by

# aptitude install mysql-server

To make the DBMS usable for funambol, two further steps are necessary: set a root password for mysql and create a database named funambol, that will contain all funambol related data

$ /usr/sbin/mysqladmin -u root -p 'goodpassword';
$ mysql -u root -p
mysql> create database funambol;
mysql> use funambol
mysql> grant all on funambol.* to funambol identified by 'funambol';
mysql> flush privileges;
mysql> quit

This creates a user 'funambol' with password 'funambol' that can access the database funambol and has all rights there. The user and password will be required during the next step: installing the funambol ds server.

Installing the funambol ds server

Downloading and unpacking

Obtain the funambol ds server from http://www.funambol.org and unpack it to a directory of your choice. We will install it to /opt We also need the jdbc-connector for mysql. The funambol server is written in Java™ and the connector is the part between Java™ and mysql. The connector is available at http://www.mysql.com and we unpack it to /opt as well. Please note, that the connector needs to be accessible by the tomcat server and needs to be copied into the server's lib directory. We will use mysql-connector-java-5.0.4 here

# cp mysql-connector-java-5.0.4-bin.jar /usr/share/tomcat5/common/lib/

Configuration for installation

Next we have to configure the install.properties file contained in the funambol tree. Edit the part describing the connection to a mysql DBMS like this:

jdbc.classpath=/usr/share/tomcat5/common/lib/mysql-connector-java-5.0.4-bin.jar
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost/funambol
jdbc.user=funambol
jdbc.password=funambol

Please note, that here the database name, user and password appear we defined before. Before continuing make sure, that the tomcat server is stopped

# invoke-rc.d tomcat5 stop

As the install script of the funambol ds server requires the environment variable J2EE_HOME set as well, we add the following lines to /etc/bash.bashrc

J2EE_HOME="/usr/share/tomcat5"
export J2EE_HOME

Downloading and unpacking

The next step we have to take is to install the funambol administration tool. We can get it from http://www.funambol.org. After downloading we unpack it to /opt.

At this point we are ready to start the installation script of the funambol ds server. The script might complain, that the environment variables mentioned before are not set. In this case you need to export them manually

# export JAVA_HOME="/usr/lib/j2sdk1.5-sun"
# export J2EE_HOME="/usr/share/tomcat5"

The installation itself

To run the installation script of the funambol ds server it is necessary to change to the DS_SERVER_HOME as described in the funambol ds server administration guide and run

# sh bin/install.sh tomcat50

<!> Unfortunately on my system the script fails with an error “Specified key was too long. Max key length is 500”. The problem is described in the funambol mailing lists by Bruno Arliguy (see: http://sourceforge.net/mailarchive/message.php?msg_id=13135170). The mentioned workaround worked for me too: add the "ENGINE=InnoDB" statement at the end of the create table statements in Funambol/ds-server/default/sql/mysql/create_engine.ddl

Start the server

The funambol ds server is now ready for use. It can be started as described in the funambol ds server administration guide

# cd <DS_SERVER_HOME>
# sh bin/start.sh

Before accessing the server via the administration tool you should check, that the logfiles in /var/log/tomcat5 contain no errors. -- ?RalphPlawetzki