Thursday, July 9, 2009

Installing SetupX under ubuntu

a first try to write a connector to getch all kinds of informations, using a hibernate layer.

how to:
  • install your plain old Ubuntu server box
  • install java 5: apt-get install sun-java5-jdk
  • install subversion: apt-get install subversion
  • install unzip: apt-get install unzip
  • install ant: download ant 1.6.5, unzip it and add it to the path
  • install jboss: download jboss-4.2.3.GA, unzip it in your directoy of choice, let's use opt
  • get setupX:
    svn checkout -r421 http://setupx.googlecode.com/svn/trunk/ /opt/setupx
  • install mysql: apt-get install mysql-server
  • start the mysql server: /etc/init.d/mysql start
let's configure setupX:
  • lims/setup/setup.properties - general configuration
  • lims/setup/resources/system/config.properties - configure where jboss sits
  • lims/setup/resources/system/system.properties - configure email settings and jboss again. Also specify your data directories
let's start our first install
  • go into /opt/jboss/seupx/lims
  • execute 'sh firstinstall.sh'
at this point we run into several issues, since we want to install setupx in '/opt/setupx' and not '/usr/share/setupx'.


[java] Util_____________: DEBUG: Using org.xml.sax.parser : org.apache.xerces.parsers.SAXParser
[java] org.setupx.repository.SettingsUnavailableException: java.io.FileNotFoundException: /usr/share/setupx/lims/conf/system/system.properties (No such file or directory)

This is directly related to a bug in the class "org.setupx.repository.Settings" and can be fixed with a simple change in this file to reflect our directory.

This is a nice example why it's considered to be bad practice to hard code file paths.


private static File file = new File("/opt/setupx/lims/conf/system/system.properties");

Since we already created the database with the 'firstinstall.sh' script we now just need to go into setupx/lims/setup and execute:

sh setup.sh

After the installation finished we could now access setupX under:

http://****:8080/xx1/

your setupx username is the set email address and your password the same.

review:

The installation took a lot of effort to get it working and is not yet perfect. I think the first thing which should be done is to write a graphical ant installer which modifies the files for you, to make this process a bit easier.
The main issue is really the absolute file path in the one java class.

Time cost: a bit over an hour and 30 minutes.

No comments:

Post a Comment