howto:molgenis_install
This is an old revision of the document!
Table of Contents
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. Note that version 8 is a requirement for the molgenis platform.
You will also need to install Tomcat 7. This is straightforward with
sudo apt-get install tomcat7
Installation Procedure
- Tomcat will require some further configuration for Molgenis to run
- 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
- 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 - In the
JAVA_OPTS
line (this is used to set the JVM parameters):- Change
-Xmx
parameter to whatever its value to-Xmx1g
- Add The following two properties
-Dmolgenis.home=/var/lib/molgenis -Dlog4j.configuration=log4j-molgenis.properties
- 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"
- After these changes to Tomcat you will need to restart the application server with:
sudo service tomcat7 restart
- Create a molgenis directory which is writable by the
tomcat7
user (this is used for state information).sudo mkdir /var/lib/molgenis
- Set the correct permissions with
sudo chown tomcat7:tomcat7 /var/lib/molgenis
- Download the latest version of molgenis web application file (this is in the form of a Java war).
- Do this by searching for molgenis-app in the maven repository
- Download the war file by using wget. e.g.
wget http://search.maven.org/remotecontent?filepath=org/molgenis/molgenis-app/1.8.2/molgenis-app-1.8.2.war -O molgenis-app-1.8.2.war
- Rename the downloaded war file to
ROOT.war
(case important). This is an annoying and necessary limitation - Make sure owner tomcat7 owns the file,
sudo chown tomcat7:tomcat7 ROOT.war
- 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
- If you want to follow what is going on, before copying set a
tail -f /var/log/tomcat7/catalina.out
howto/molgenis_install.1440156573.txt.gz · Last modified: 2018/10/09 10:12 (external edit)