Prerequisites for using InterMine

Programs and packages

  • The Java SDK (minimum 5.0) is required to build and use InterMine
  • PostgreSQL is used as the relational backing store. Ensure that the postmaster is set up to accept TCP/IP connections ("tcpip_socket=true" in postgresql.conf) from "localhost" (host 127.0.0.1 in pg_ident.conf).
  • The Ant tool is used the invoke the InterMine build. Please use version 1.6.5 or greater.
  • For running tests you will need JUnit (http://www.junit.org). Note that the most recent versions of JUnit require Java 5.0 so we recommend JUnit version 3.8.1. The junit.jar file needs to be added to the java classpath with "export CLASSPATH=/path/to/junit.jar" and the junit.jar needs to be copied to the ant lib directory (eg. apache-ant-1.6.5/lib/)
  • You will need subversion to check out and update source code.

Tomcat

If you intend to deploy the web front-end or the web service then you will also need:

  • The Tomcat servlet container. Any version greater than 5.0 should run well. After installation you will need to set up a tomcat user with the 'manager' role by editing $CATALINA_HOME/conf/tomcat-users.xml:
<tomcat-users>
  ...
 <role rolename="manager"/>
 <user username="manager" password="manager" roles="manager"/>
</tomcat-users>
  • To avoid java.lang.OutOfMemory errors, specify the JVM heap size in $TOMCAT_HOME/bin/tomcat.sh. You can specify '-Xmx256m -Xms128m' as part of TOMCAT_OPTS. That'll set your max/min JVM heap size to 256/128MBs, for example.

Postgres

With a new installation of postgres you will commonly need to change the following settings for InterMine to work correctly:

In postgresql.conf (e.g. in /var/lib/pgsql/data/conf) set:

listen_addresses = '*'     # default is 'localhost'

*** NOTE - Ant ***

InterMine uses a patched version of the ant-contrib.jar which fixes a bug with the <outofdate> target. If you have an unpatched ant-contrib.jar on your classpath then this will cause the InterMine build to fail. Check in your ant_location/lib directory. The first error you will probably see is "cannot resolve symbol : class Item" when compiling as the code generation step will have failed.

*** NOTE - Java options ***

InterMine can be rather memory-intensive, so you will probably need to set memory options for Java. To do this, set the environment variable ANT_OPTS to options to pass in to Java. We use a value of:

"-server -XX:MaxPermSize=256M -Xmx1700m -XX:+UseParallelGC -Xms1700m -XX:SoftRefLRUPolicyMSPerMB=1 -XX:MaxHeapFreeRatio=99"

Although you should change the -Xmx and -Xms values if you have very little or very much RAM in your computer.

Note: if the MaxPermSize is too low you will get a java.lang.OutOfMemoryError: PermGen space - increase the setting in that case.