Prerequisites for using InterMine

InterMine makes use of a variety of freely available software packages. All of the programs below are required, except for Tomcat if you are not planning to make use of InterMine's web application.

SoftwareMinimum VersionPurpose
Subversion1.5check out and update source code
Java SDK5.0build and use InterMine
Ant1.6.5invokes the InterMine build
Tomcat5.0website
PostgreSQL8.3database
JUnit3.8.1run Java tests

Configuration

After installation, some software requires a little configuration to work correctly with InterMine.

Subversion

  • Introduction to Subversion (svn)
  • The Subversion book gives detailed installation instructions
    • Fedora users can just run this command: "sudo yum install subversion"
    • Debian users can just run this command: "sudo apt-get install subversion"
  • See SVNCheckout for instructions on how to checkout the InterMine software

Java

  • Java installation instructions
    • Debian users can just run this command: "sudo apt-get install sun-java6-jdk"
  • 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 pass in to Java:
    ANT_OPTS="-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.
  • Increase the MaxPermSize setting if you get this error:
    java.lang.OutOfMemoryError: PermGen space
    

See also CommonErrors

Ant

Tomcat

NOTE: several people have had problems with Tomcat installations set up by Linux package managers. We recommend installing according to the these instructions, it's very straightforward.

  • The quickest way to get a working Tomcat (on Unix/Linux) is to:
    1. Download the latest stable binary distribution tar.gz from the Apache Tomcat site.
    2. Unpack it:
         > tar -zxvf apache-tomcat-x.y.z.tar.gz
      
    3. Use the startup.sh and shutdown.sh scripts in apache-tomcat-x.y.z/bin/ to start and stop Tomcat. You can run it as your own user for development purposes.
    4. Set up the manager user as below.
  • Or see Tomcat's installation instructions
  • 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>
     <!-- you can add more users or roles if needed -->
     <role rolename="manager"/>
     <user username="manager" password="manager" roles="manager"/>
    </tomcat-users>
    
    You can check this works by accession the manager interface at, e.g. localhost:8080/manager/html
  • 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.

Postgres

  • Introduction to PostgreSQL
  • PostgreSQL has packages for most systems that set up everything for you.
  • You should use at least version 8.3, as we have recently removed workarounds for some bugs in previous versions. Postgres 8.4 will have significantly better performance for some queries when it is released.
  • After installation, you need to update postgresql.conf:

Required:

listen_addresses'*'
tcpip_sockettrue(not needed in recent releases)

Recommended, for optimum performance:

shared_buffersSet to around 150MB
temp_buffersSet to around 80MB
work_memSet to around 500MB but not more than 1/10 of available RAM
maintenance_work_memSet to around 3000MB but not more than 1/5 of available RAM
default_statistics_targetSet to around 250
random_page_costSet to around 2.0, rather than 4.0
effective_cache_sizeSet to about 2/3 the amount of RAM in the computer
geqo_thresholdSet to 14
from_collapse_limitSet to 14
join_collapse_limitSet to 14
max_locks_per_transactionSet to 640

You should also add a line to the pg_hba.conf file to allow logging in via password:

host    all         all         0.0.0.0/0             password

You also need to install the bioseg data type, and the contrib btree_gist plug-in, as described in BiosegInstallation.

For some basic postgres commands see: PostgresBasics

JUnit

  1. Download the junit-X.X.jar from http://www.junit.org/
  2. Copy to the ant lib directory, eg. apache-ant-1.6.5/lib/
  3. Add to the java classpath with this command, replacing X.X with the version number.
    export CLASSPATH=/path/to/junit-X.X.jar
    
    

See also: MacInstallation, Hardware