User Tools

Site Tools


howto:molgenis_install

This is an old revision of the document!


Installing Molgenis on Ubuntu

Note that the below procedure would not have been possible without the help of David van Enckevort. The document highlights the installation of the Molgenis web application. If you would like to develop or contribute (code) to the project, you are better off forking the github version.

Requirements

Install Java 8 (my favorite is the Oracle JDK). There are many websites explaining how to do this, but the TL;DR version is:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer # some annoying licence acceptance terms will pop up
sudo apt-get install oracle-java8-set-default

When you are done java -version and javac -version should yield the Java 8 version and build number.

You will also need to install Tomcat 7. This is straightforward with

sudo apt-get install tomcat7

Installation Procedure

  1. Tomcat will require some further configuration for Molgenis to run
    1. First edit the tomcat defaults (these are found in /etc/default/tomcat7). This special location is used to store admin settings which are likely to change and you want to keep across updates. sudo vim /etc/default/tomcat7
    2. Add the following line JAVA_HOME=/usr/lib/jvm/java-8-oracle to the file to make sure the JVM is the oracle one we installed above
    3. In the JAVA_OPTS line (this is used to set the JVM parameters):
      1. Change -Xmx parameter to whatever its value to -Xmx1g
      2. Add The following two properties -Dmolgenis.home=/var/lib/molgenis -Dlog4j.configuration=log4j-molgenis.properties
      3. The resulting line should look something like:
        JAVA_OPTS="-Djava.awt.headless=true -Xmx1g -XX:+UseConcMarkSweepGC -Dmolgenis.home=/var/lib/molgenis -Dlog4j.configuration=log4j-molgenis.properties"
  2. Create a molgenis directory which is writable by the tomcat7 user (this is used for state information).
    1. sudo mkdir /var/lib/molgenis
    2. Set the correct permissions with sudo chown tomcat7:tomcat7 /var/lib/molgenis
  3. Download the latest version of molgenis web application file (this is in the form of a Java war).
    1. Do this by searching for molgenis-app in the maven repository
    2. Download the war file by using wget. e.g.
      jp@maltabiobank:~/downloads$ wget http://search.maven.org/remotecontent?filepath=org/molgenis/molgenis-app/1.8.2/molgenis-app-1.8.2.war
  4. Rename the downloaded war file to ROOT.war (case important). This is an annoying and necessary limitation
  5. Make sure owner tomcat7 owns the file, sudo chown tomcat7:tomcat7 ROOT.war
  6. Copy the newly renamed ROOT.war to the Tomcat webs directory (by default this is in /var/lib/tomcat7/webapps)
sudo cp -vp ROOT.war /var/lib/tomcat7/webapps
  1. If you want to follow what is going on, before copying set a tail -f /var/log/tomcat7/catalina.out
howto/molgenis_install.1440081177.txt.gz · Last modified: 2018/10/09 10:12 (external edit)