Infolog Server configuration and installation guide

Copyright 2012, RagingGoblin http://raginggoblin.wordpress.com

Infolog is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Infolog is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Infolog. If not, see http://www.gnu.org/licenses.


Introduction

The Infolog desktop client is the desktop companion of Egroupware Infolog. It can be used in conjunction with an Egroupware installation or as a stand alone program. Infolog consists of a client and a server program. The client is capable of synchronizing with the server on a regular basis. This file provides information about the installation and configuration of the server program.

Contents:

  1. Infolog Server
  2. Infolog Server with https

1. Infolog Server

Installation

In order to run the server the provided archive should be extracted to a convenient directory on the server computer. After extraction, the following file structure should be in place:

/Infolog installation directory
 |
 |-hibernate.cfg.xml
 |-log4j.xml
 |-InfologServer.jar
 |-c3p0.properties

Configuration

hibernate.cfg.xml

This file contains the configuration for the database connection in xml format. Several properties are of importance here:

log4j.xml

Logging is done through the log4j system. Normally logging is written to a file as configured by this xml file. By changing the "appender", logging can be written to the console as wel. The amount of logging is configured through the "threshold" property. Higher levels will generate fewer logging. Possible levels are: DEBUG, INFO, WARN, ERROR and FATAL. See http://logging.apache.org/log4j/1.2/ for further information.

Run server program

The program is provided as an executable jar file (java archive) named InfologServer.jar. The program can be started using the following commands:

java -jar InfologServer.jar
Will run the server and start it right away.
java -jar InfologServer.jar -p <PORTNUMBER>
Will run the server and start it right away listening on the provided port number. Default is 8087.
java -jar InfologServer.jar -g <true|false>
Will run the server and with or without a rudimentary gui to start and stop the server. Default is without a gui (false).
java -jar InfologServer.jar - e <ENDPOINT IP ADDRESS>
Will run the server and start it right away with the endpoint at the provided ip address or hostname. Default is your external ip address.

Every combination of these switches is possible. To test the server point a browser to:

https://<SERVERNAME OR IP>:<PORT>/infolog?wsdl
You should see the wsdl of the Infolog webservice, which is a xml description of the functionality.

The server program should be run in the background as a system service. Every operating system has its own way of handling services, therefore no generic description can be provided here. When using a Linux server you can use a script provided by Christian d'Heureuse on http://www.source-code.biz/snippets/java/7.htm

Run server with other DBMS than MySQL

Though the program is packaged with a MySQL driver, using a different DBMS is certainly possible. To communicate with another DBMS than MySQL you need to do two things:

  1. Configure hibernate to use the correct dialect:
    Set the correct values in the file hibernate.cfg.xml, settings that need to be changed are:
    Look for examples with your specific DBMS on the internet.

  2. Download the appropriate JDBC driver and put it on the classpath when running the server program:
    Look on the internet for the correct JDBC driver package, this should be provided as a jar file. Put it in in the same folder as the Infolog.jar file. When you get a ClassNotFoundException, put the current folder on your classpath by running the program with an extra option:
    java -classpath . -jar Infolog.jar

2. Infolog Server with HTTPS

Though the password is encrypted before send to the server, all communication between the client and the server is in plain text (http). Many people do not consider this a security thread because they exchange all sorts of private data through unsecured channels such as e-mail etc. If however you want to keep the information in your sticky notes absolutely secret you should consider the usage of a HTTPS. The server program itself does not provide this feature, but it is easy to let your webserver handle this. As you already have the necessary infrastructure for your Egroupware installation, why not use that to secure the Infolog Server?

Here follows a brief instruction how to setup an existing Apache webserver (with https support) to provide the Infolog Server over HTTPS.

Enable the proxy modules:

a2enmod mod_proxy
a2enmod proxy_http

Add the following lines to httpd.conf:

ProxyRequests Off
ProxyPass /infolog http://<SERVERNAME OR IP>:<PORT>/infolog
ProxyPassReverse /infolog http://<SERVERNAME OR IP>:<PORT>/infolog

Now restart the webserver and point a browser to:

https://<SERVERNAME OR IP>/infolog?wsdl
You should see the wsdl of the Infolog webservice.