Installation Guide v 1.4.0

jcvi edited this page Nov 9, 2013 · 3 revisions

For questions or feedback please write an email to the METAREP mailing list at

Step 1 Install Required 3-rd Party Tools
METAREP uses the following open source tools that need to be installed. Please refer to the individual
tool pages for installation instructions.

CentOS 5.5. installation

  • install minimal CentOS 5.5 version [download]
  • Use CentOS yum package manager to install the following packages
    • mysql.i386 5.0.77-4.el5_5.3
    • R.i386 2.10.0-2.e15
    • perl.i386 4:5.8.8-32.el5_5.1
    • httpd.i386 2.2.3-43.el5.centos.3
    • php.i386 5.2.10-1
  • install Java Runtime Environment and Apache Solr/Lucene (see above).

Step 2 Download and install METAREP source code

  • download METAREP version 1.3.2 [download]
  • move zip file into your Apache Web Server htdocs directory mv /<APACHE_WEB_HOME>/htdocs
  • unzip file unzip /<APACHE_WEB_HOME>/htdocs/
  • rename directory mv /<APACHE_WEB_HOME>/htdocs/METAREP-1.4.0-beta /<APACHE_WEB_HOME>/htdocs/metarep
  • check that the directory structure under /<APACHE_WEB_HOME>/htdocs/metarep contains an app and a cake directory
  • the path to the metarep directory will subsequently be referred to as <METAREP_HOME>
  • create a symbolic link tmp under the application webroot directory that points to a tmp directory on your system, e.g. /tmp, referred to as <METAREP_TMP> ln -s <METAREP_TMP> <METAREP_HOME>/app/webroot/tmp

Step 3 Set up METAREP MySQL database

  • if your have installed MySQL as root and have not yet assigned a password, create a password by executing
    mysqladmin -u root password <password>
  • create the metarep MySQL database by typing mysql -u root -p -e "create database metarep" in the command line or create database metarep using the MySQL client
  • gunzip /<METAREP_HOME>/db/metarep.mysql.db.gz
  • import dump file using mysql -u root -p metarep < /<METAREP_HOME>/db/metarep.mysql.db

Step 4 Set up METAREP Apache Solr/Lucene instance

  • cd into your Apache Solr/Lucene installation directory,e.g apache-solr-3.1.0 (subsequently referred to as <SOLR_HOME> directory)
    cd /<SOLR_HOME>
  • create metarep-solr directory within your Solr home directory
    mkdir /<SOLR_HOME>/metarep-solr
  • copy the METAREP Solr configuration files into the new metarep-solr directory
    cp -a /<METAREP_HOME>/solr/* /<SOLR_HOME>/metarep-solr
  • cd into the example folder of your Solr home directory
    cd /<SOLR_HOME>/example
  • start your Apache Solr/Lucene server. Adjust port (-Djetty.port) and java maximum heap size (-Xmx) if needed.
    java -server -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+DisableExplicitGC -Xms3G -Xmx4G
    -Djetty.port=1234 -Dsolr.solr.home=/<SOLR_HOME>/metarep-solr -jar start.jar
  • test it at http://localhost:1234/solr . If the page prints ’Welcome to Solr! ’ everything has been correctly set up.

Step 5 Import example datasets

  • cd /<METAREP_HOME>
  • gunzip //db/metarep.sqlite3.db.gz@
  • The indexing script looks up additional annotation information from the sqlite3 database under /<METAREP_HOME>/db/metarep.sqlite3.db. Adjust the arguments to match the SQlite/MySQL database and Solr connection parameters. The specified tmp directory will be used to store intermediate XML files.
  • gunzip example files gunzip /data/tab/*.gz
  • Execute the loading script to import tab delimited example files under /<METAREP_HOME>/data/tab:

perl scripts/perl/ --project_id 1 --project_dir data/tab --format=tab --sqlite_db db/metarep.sqlite3.db --solr_url http://localhost:1234 --solr_home_dir <SOLR_HOME> --solr_instance_dir <SOLR_HOME>/metarep-solr --mysql_host localhost --mysql_db metarep --mysql_username metarep --mysql_password metarep --tmp_dir /usr/local/scratch

  • check if the tab delimited data load was successful. Go to your Solr default admin page at http://localhost:1234/solr/ (adjust host/port if needed). You should see 7 links that represent the newly loaded datasets. Click on a dataset. Enter ‘protein’ into the Query textfield and hit ‘search’. You should see XML formatted search results. In addition, you can check the number of loaded documents per dataset by using the statistics link at the top menu of the dataset admin page. It displays the number of documents in the stats: section. If you see search results and the document number is higher than zero, your load was successful.

Step 6 Adjust METAREP configuration files

  • edit the METAREP configuration file to match your web/solr configuration /<METAREP_HOME>/app/config/metarep.php. Detailed information about each of the variables can be found here
  • edit the database configuration file to connect to your metarep and gene_ontology MySQL databases /<METAREP_HOME>/app/config/database.php.

Step 7 Configure and start Apache web server

  • modify the Apache httpd.conf webserver configuration file to work with mod_rewrite:
    Uncomment the LoadModule rewrite_module .. line so that it looks like this
    # LoadModule foo_module modules/
    LoadModule php5_module modules/
    LoadModule rewrite_module libexec/apache2/
  • add the following metarep directory configuration
    <Directory /metarep>
    Options FollowSymLinks
    AllowOverride All
  • start Apache web server
    /<APACHE_WEB_HOME>/bin/apachectl start
  • go to http://localhost:80/metarep to see the METAREP welcome page

Step 8 Create new project

  • login as admin
  • click on New Project in the top menu
  • enter project name: ‘HOTS vertical ocean depth profile’
    *enter project description: ‘Planktonic microbial communities in the North Pacific Subtropical Gyre, from the ocean’s surface to near–sea floor’ depths
  • hit the submit button
  • go to http://localhost:80/metarep/projects/view/1 to analyze the project’s datasets

Step 9 Change METAREP admin password

  • login with username:admin and password:admin
  • click on change password on the dashboard page and enter your new admin password