OBM Sync server install from sources

Presentation

This document explains how to install OBM-Sync server on a Linux server for OBM 2.1.x only. Use packages to install for OBM 2.2.x and following.

Prerequirements

  • An OBM server instance using a MySQL database.
  • Java Developement Kit (JDK) on the machine where will be installed OBM-Sync (a Sun JDK 1.6.x is mandatory).
  • Ant, a Java based make tool using same JRE+JDK as Tomcat.
  • Tomcat archive 5.5 and greater downloadable on http://tomcat.apache.org/.
  • OBM Sync Archive file or Subversion tools installed

Useful diagnostics procedure

  • Check if Java is installed:
java -version
  • To check JDK used by Ant:
ant -diagnostics | grep java.version

Must return same version as installed JDK.

OBM-Sync preparation

OBM-Sync sources copying

Method 1 : OBM Archive

Untar obm-sync.x.x.x.tar.gz archive in your chosen directory. (ex : /opt/obm-sync) This directory will be named $OBM_SYNC_HOME in the next.

Method 2 : SVN export

Export SVN repositery in your chosen directory. (ex : /opt/obm-sync) This directory will be named $OBM_SYNC_HOME in the next.

svn export http://svn.obm.org/svn/obm-sync/trunk/ /opt/obm-sync

OBM-Sync sources building : ant dist

Set data settings needed to build : build.properties

File : $OBM_SYNC_HOME/build.properties

Copy build.properties.sample file located in $OBM_SYNC_HOME/ directory et name it build.properties.

Optional

Edit this file, replace « localhost » by the machine address:

tomcat.url=http://localhost:8080/obm-sync

Launch building

cd $OBM_SYNC_HOME
ant dist

Installation in Tomcat

Tomcat server archive copying

Untar Tomcat archive in a directory of your choice. (ex : /opt/tomcat5.5.x)

Optional

Create a symbolic link « tomcat » pointing to this directory :

ln -s /opt/tomcat5.5.x /opt/tomcat

This directory will be called $TOMCAT_HOME in the next.

External libraries copying used by OBM-Sync in Tomcat

cp $OBM_SYNC_HOME/classes/common/*.jar $TOMCAT_HOME/common/lib/

Configure Tomcat logging

cp $OBM_SYNC_HOME/log4j.properties $TOMCAT_HOME/common/classes/

OBM-Sync deployment in Tomcat

OBM-Sync servlet configuration : obm-sync.xml

# Create setting directory if not exists
mkdir -p $TOMCAT_HOME/conf/Catalina/localhost
 
# Sample OMB-Sync setting copying
cp $OBM_SYNC_HOME/obm-sync.xml $TOMCAT_HOME/conf/Catalina/localhost/

Edit the file newly created ($TOMCAT_HOME/conf/Catalina/localhost/obm-sync.xml)

Set OBM-Sync directory Change value of the docBase attribute with the path where will be deployed OBM-Sync:

<Context path="/obm-sync" docBase="$OBM_SYNC_HOME/dist"

Set OBM MySQL server address Change settings to allow OBM-Sync to connect to OBM database: Address:

url="jdbc:mysql://localhost/obm?relaxAutocommit=true&amp;zeroDateTimeBehavior=convertToNull"

Login & password:

login="obm"
password="obm"

Change login and password by your database's.

Miscellaneous settings to subscribe in Tomcat : conf/server.xml

Put the following line between <GlobalNamingResources></ GlobalNamingResources> XML markup in $TOMCAT_HOME/conf/server.xml file:

    <Resource name="UTransaction" auth="Container"
              description="Aliapool TransactionManager"
              factory="fr.aliacom.jndi.UserTransactionFactory"
              type="javax.transaction.UserTransaction"/>

OBM-Sync Initial deployment : ant deploy

# Tomcat server start
 
$TOMCAT_HOME/bin/catalina.sh run
 
# initial deployment execution
 
cd $OBM_SYNC_HOME
ant deploy

Test and checking of full-working install

HTTP servlet test

http://machine:8080/obm-sync/services page content

And now... Some Services
Time (wsdl) 
postTime 
Task (wsdl) 
logUserIn 
getSync 
createTask 
removeTask 
modifyTask 
Calendar (wsdl) 
logUserIn 
getSync 
findEvent 
createEvent 
modifyEvent 
removeEvent 
listCalendars 
getRefusedKeys 
getEventFromId 
getEventTwinKeys 
getUserEmail 
AdminService (wsdl) 
AdminService 
Version (wsdl) 
getVersion 
Categories (wsdl) 
listCategories 
User (wsdl) 
getSync 
createUser 
modifyUser 
removeUser 
logUserIn 
getUserFromId 
getUserTwinKeys 
AddressBook (wsdl) 
getSync 
createContact 
createContactWithoutDuplicate 
modifyContact 
removeContact 
listBooks 
isReadOnly 
logUserIn 
getContactFromId 
getContactTwinKeys 

Ant test

$ cd $OBM_SYNC_HOME
$ ant tests.run
install_obm_sync_server_from_sources.txt · Last modified: 2010/03/25 16:03 by nicolasl
Driven by DokuWiki