Website 3 Installing SOP

From ReactomeWiki

(Redirected from Website Installing SOP)
Jump to: navigation, search

Note: This documentations covers the current version of the reactome web site.
The older installation protocol is available at Website_2_Installing_SOP


Installation Notes

Debian/Ubuntu

Note: The installation protocol below is specific to Debian/Ubuntu-derived Linux distributions. It has been tested on the following distributions:

  • Ubuntu 12.04 and 13.10
  • Debian 7.0

Requirements

  • The server needs at least 20 Gbyte in the root file system.
  • You need to be comfortable on the unix command line interface
  • The installation requires root access
  • For best results, use a freshly installed Linux OS
  • The default is to run reactome on port 80 (apache) and port 8080 (tomcat). If you plan to use other ports, you will need to manually edit the files below after installation.
 /etc/apache2/sites-available/reactome
 /usr/local/gkb/tomcat/apache-tomcat/conf/server.xml

Automated Installation

A shell script that automates all of the system configuration, software downloads and installation is available for Debian/Ubuntu

Download the script

wget http://reactome.org/download/current/install_reactome.sh

Run the script as root

sudo /bin/bash install_reactome.sh
  • The script does not require any command-line arguments.
  • It will prompt you for the MySQL root password to be created/used for mysql configuration and database set up.
  • The downloaded reactome software is already configured for database access and does not require user input.

Manual Installation

Downloading and installing the Reactome software.

 wget http://reactome.org/download/current/reactome.tar.gz
 tar zxf reactome.tar.gz
 mv reactome /usr/local/gkb

Installing/Updating third-party software with apt-get

 apt-get clean  -yq
 apt-get update -yq
 apt-get install -yq \
 build-essential \
 perl \
 curl \
 mysql-server \
 apache2 \
 libexpat1 \
 libexpat1-dev \
 php5 \
 php5-mysql \
 libbio-perl-perl \
 libgd-gd2-perl \
 openjdk-7-jre-headless \
 openjdk-7-jdk

Make sure perl is in the expected location

 cd /usr/local/bin
 ln -s /usr/bin/perl

Installing CPAN Perl modules

We will use the cpanminus app to bring in the perl modules (less overhead than the CPAN shell)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 curl -L http://cpanmin.us | perl - --sudo App::cpanminus
 cpanm -q \
 Archive::Tar \ 
 Data::CTable \
 File::Basename \
 GraphViz \
 IO::String \
 List::Compare \
 Math::Trig \
 SOAP::Lite \
 WWW::SearchResult \
 XML::Simple \
 Search::Tools::HiLiter

Databases

Downloading database dumps

 wget http://reactome.org/download/current/databases/gk_current.sql.gz
 wget http://reactome.org/download/current/databases/gk_current_dn.sql.gz
 wget http://reactome.org/download/current/databases/gk_wordpress.sql.gz
 wget http://reactome.org/download/current/databases/gk_stable_ids.sql.gz

Initializing databases

If you have set a MySQL root password, use the -p flag in the commands below.

  mysql -uroot [-p]  -e  \
  'DROP DATABASE IF EXISTS gk_current;
  CREATE DATABASE gk_current;
  DROP DATABASE IF EXISTS gk_current_dn;
  CREATE DATABASE gk_current_dn;
  DROP DATABASE IF EXISTS gk_stable_ids;
  CREATE DATABASE gk_stable_ids;
  DROP DATABASE IF EXISTS gk_wordpress;
  CREATE DATABASE gk_wordpress;'

Loading databases

Load the databases. These commands will take a while to run. Make sure you have at leat 8 Gbytes of available space on the file system that contains the mysql databases (default: /var/lib/mysql). [-p] is only required if you have configured a root password for mysql.

 zcat databases/gk_current.sql.gz | mysql -uroot [-p] gk_current
 zcat databases/gk_current_dn.sql.gz | mysql -uroot [-p] gk_current_dn
 zcat databases/gk_wordpress.sql.gz | mysql -uroot [-p] gk_wordpress
 zcat databases/gk_stable_ids.sql.gz | mysql -uroot [-p] gk_stable_ids

Setting database access permissions

Set the access permissions (get the login credentials from /usr/local/gkb/database/login.txt) The defaults and config file locations can be seen by:

 cat /usr/local/gkb/database/login.txt

 UNAME="Your mysql username"
 UPASS="Your mysql password" 
 mysql -uroot [-p] -e "GRANT SELECT ON gk_stable_ids.* TO '$UNAME'@'localhost' IDENTIFIED BY '$UPASS'"
 mysql -uroot [-p] -e "GRANT SELECT ON gk_current.*     TO '$UNAME'@'localhost' IDENTIFIED BY '$UPASS'"
 mysql -uroot [-p] -e "GRANT ALL ON gk_current_dn.* TO '$UNAME'@'localhost' IDENTIFIED BY '$UPASS'"
 mysql -uroot [-p] -e "GRANT ALL ON gk_wordpress.*   TO '$UNAME'@'localhost' IDENTIFIED BY '$UPASS'"

Apache Web Server

Configuring Apache2

Make sure we have the required modules enabled

 cd /etc/apache2/mods-available
 a2enmod \
 mime \
 include \
 autoindex \
 dir \
 cgi \ 
 alias \
 proxy \
 proxy_http \
 rewrite

Set up the reactome configuration

 cd /etc/apache2/sites-available
 cp /usr/local/gkb/website/conf/httpd.conf reactome.conf
 a2dissite default
 a2ensite reactome.conf

Note on Apache 2.4+

If you are using apache 2.4 or later, there is a syntax change in the configuration.

  • Edit /etc/apache2/sites-available/reactome.conf to uncomment the line below (it occurs twice in the file).
 #Require all granted

(Re)Starting the server

/etc/init.d/apache2 restart

Tomcat Servlet

tomcat7 user

This is the user that will own the tomcat process

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 groupadd tomcat7
 useradd -g tomcat7 -s /sbin/nologin -d /opt/tomcat/temp tomcat7

Download software

Download the software from Apache.

  
 cd /usr/local/gkb/tomcat
 rm -fr apache-tomcat* 
 wget wget https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50.tar.gz 
 tar zxf apache-tomcat-7.0.50.tar.gz
 rm -f apache-tomcat-7.0.50.tar.gz
 ln -s apache-tomcat-7.0.50 apache-tomcat
 cp etc_init.d_tomcat7 /etc/init.d/tomcat7

Install the Java components of Reactome

 cd /usr/local/gkb/tomcat
 mv webapps/*.war apache-tomcat/webapps
 rm -fr webapps
 chown -R tomcat7:tomcat7 apache-tomcat-${VER}

Starting the server

/etc/init.d/tomcat7 restart

Configuring tomcat to start on system boot

sudo update-rc.d tomcat7 defaults