DIPSBC Installation instructions

General notes

The following guidelines describe the exemplary setup of a wiki based data integration system. They are laid out for Unix/Linux systems, but can accordingly be applied to other systems (Windows, Mac OS).

Short summary

  1. Install a web server (Apache is recommended, but other servers can be used as well)
  2. Install a Solr server and index some data
  3. Install Foswiki including the SolrSearch Plugin

Detailed description

It is recommended to execute the following installations as a specific Unix user created for that aim (separately from your personal Unix account).

1. Apache Web Server

  • Download the current Apache HTTP server (Unix source).
  • The following are recommended commands to compile the source code and install the server (with the option to choose the location as $APACHE_DIR):

   tar xvzf httpd-<VERSION>.tar.gz
   cd httpd-<VERSION>
   ./configure --prefix=$APACHE_DIR --enable-proxy --enable-ssl --enable-rewrite --enable-vhost-alias --enable-cgi
   make install

  • Adjust the server configuration (server URL, port number etc.) at $APACHE_DIR/conf/httpd.conf
  • Start (stop/restart) the server: $APACHE_DIR/bin/apachectl -k start (stop/restart)

2. Foswiki

  • Download the current Foswiki release.
  • Change directory to $APACHE_DIR and unpack the Foswiki distribution
  • Follow the steps in the Foswiki Installation Guide.
  • Recommendations for the configure script ($FOSWIKI_URL/foswiki/bin/configure):
    • Security and Authentication, Sessions: UseClientSessions
    • Security and Authentication, Login: ApacheLogin
    • Security and Authentication, Registration: uncheck 'EnableNewUserRegistration'

  • Adjust $APACHE_DIR/conf/foswiki_httpd.conf and include a reference to it at the end of $APACHE_DIR/conf/httpd.conf:
   include "conf/foswiki_httpd.conf"

  • Code to activate user authentication in Apache config files:

   AuthUserFile   $FOSWIKI/data/.htpasswd
   AuthName   'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one.'
   AuthType   Basic
   Require   valid-user

  • add this code in foswiki_httpd.conf for directory $FOSWIKI/bin and in httpd.conf for directories $APACHE_DIR/htdocs and $APACHE_DIR/cgi-bin

  • Restart server, then register yourself (System.UserRegistration)
  • Add yourself to Main.AdminGroup
  • Remember to protect the configure script at $APACHE_DIR/conf/foswiki_httpd.conf, either by password or by IP check (Allow from ...) or both.
  • Use System.BulkRegistration to register people you want to give access to the site (but this might be the final step, after Solr was installed).

3. Solr search engine

  • Because Solr is a Java web application, it needs to run within a Java capable server like Jetty or Tomcat.
  • Download the 'stable-7' version of the Jetty server (Eclipse distribution). Install it by simply unzipping it at a directory of your choice.
  • Download the current Solr release (the binary version is recommended, e.g. 'apache-solr-3.5.0.tgz'). Unpack the downloaded file and copy the following files/folders to Jetty:

   cp $SOLR/dist/apache-solr-<VERSION>.war  $JETTY/webapps/solr.war
   cp -r $SOLR/example/solr $JETTY

  • By default, Jetty listens to port 8080. If you want, you can change the port at $JETTY/etc/jetty.xml.
  • To launch Jetty with Solr:
java -DSTOP.PORT=8079 -DSTOP.KEY=mysecret -jar start.jar

  • For larger indexes, it is recommended to increase the amount of RAM assigned to Solr, e.g. 1.5 GB:
java -DSTOP.PORT=8079 -DSTOP.KEY=mysecret -jar -Xms128m -Xmx1536m start.jar

  • To stop Jetty/Solr:
java -DSTOP.PORT=8079 -DSTOP.KEY=mysecret -jar start.jar --stop

4. Indexing of data

As an example, we demonstrate the indexing of computational models from the BioModels database.

bunzip2 release_20110415.tar.bz2
tar xvf release_20110415.tar
cd release_20110415

  • Use the SBML parser to create the normalized XML version of BioModels:
VERSION="BioModels database version 19 (15-04-2011)"
for f in *curated/*.xml; do java -jar SbmlParser.jar $f '$VERSION'; done > biomodels.normalized.xml

  • Add it to the Solr index (a boost value of 4 is recommended, helper shell scripts can be found here):
solr_add.sh biomodels.normalized.xml $BOOST

5. Solr Search Plugin

  • Download the SolrSearchPlugin and the supporting Pollux package from the Download page.
  • Unzip Pollux.zip at the root of your Apache Server installation ($APACHE_DIR)
  • Unzip SolrSearchPlugin.zip at the root of your Foswiki installation ($FOSWIKI)
  • Activate the plugin by setting a tickmark at the Foswiki configure page (http://...yourdomain/foswiki/bin/configure), under Extensions > Enabled plugins
  • Adjust filepaths and/or URLs within the following files: cgi-bin/pollux/SolrPlex.pm, cgi-bin/pollux/solr_select.pl, htdocs/pollux/xslt/render_response.xsl
  • Then you can search via URL =http...yourdomain/System/SolrSearchPlugin?solrQuery=tgf+beta#Example , or create a search box on any Foswiki page with the following code:

<div class="solrSearch">
<strong>Search %SOLRSEARCHWEB% </strong><input class="foswikiInputField" size="55" id="solrSearchInputElement" value=""/>
<input type="button" value=" Submit " id="solrSearchButton" />
<div id="solrSearchControl"></div>
Topic revision: r2 - 27 Mar 2012 - 14:36:00 - FelixDreher

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback