Website 3 Installing SOP

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

Installation Notes


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

  • Ubuntu 12.04, 13.10, 14.04
  • Debian 7.0


  • The server needs at least 8 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 new instance or freshly installed Ubuntu/Debian 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.

Reactome Amazon AMI

If you want an instance of reactome but don't want to install it manually, pre-loaded, cloud-based instance of Reactome are available.


  • Follow this link for a tutorial on launching EC2 instances.
  1. Sign on to amazon AWS
  2. Go to the EC2 control panel (
  3. Select the N. Virginia zone in the pulldown menu (top-eight)
  4. Click on the Launch Instance button
  5. Click on Community AMIs
  6. Search for Reactome
  7. Click the Select button next to Reactome
  8. On the left panel, click on General purpose to select an instance size
  9. Choose m3.large
  10. Follow the remaining steps under Continue... button on the bottom right
  11. Select/create a security group that allows your IP to connect to port 22 (ssh) and has ports 80 and 8080 open.

Automated Installation

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

Download and run the script

sudo /bin/bash
  • The script does not require any command-line arguments.
  • If run locally, 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.


mkdir -p /usr/local/reactomes/Reactome/production
cd /usr/local/reactomes/Reactome/production
rm -f reactome.tar.gz

echo -e "\nUnpacking the software..."
tar zxf reactome.tar.gz
rm -f /usr/local/gkb
rm -f reactome.tar.gz
cd /usr/local
ln -s /usr/local/reactomes/Reactome/production/GKB gkb

Configuration and database access credentials

$RELEASE is the name of the current reactome database. If you are unsure, check the top few lines of

or the highest number in


 cd /usr/local/gkb/website/html/download
 ln -sf $RELEASE current

 cd /
 tar zxvf /usr/local/gkb/third_party_install/config.tar.gz

Installing/Updating third-party software with apt-get

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

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 | perl - --sudo App::cpanminus

cpanm -q \
HTTP::Tiny \
IO::String \
LWP::UserAgent \
MIME::Lite \
Net::OpenSSH \
XML::Simple \
Search::Tools \
Capture::Tiny \
WWW::SearchResult \
Log::Log4perl \
common::sense \
Email::Valid \


Downloading database dumps


Initializing databases

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

  mysql -uroot [-p]  -e  \
  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;
  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. The default credentials below will work with the standard installation

 mysql -uroot [-p] -e "GRANT SELECT ON gk_stable_ids.* TO 'reactome_user'@'localhost' IDENTIFIED BY 'reactome_pass'"
 mysql -uroot [-p] -e "GRANT SELECT ON gk_current.*     TO 'reactome_user'@'localhost' IDENTIFIED BY 'reactome_pass'"
 mysql -uroot [-p] -e "GRANT ALL ON gk_current_dn.* TO 'reactome_user'@'localhost' IDENTIFIED BY 'reactome_pass'"
 mysql -uroot [-p] -e "GRANT ALL ON gk_wordpress.*   TO 'reactome_user'@'localhost' IDENTIFIED BY 'reactome_pass'"

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 \

Set up the reactome configuration

 cd /usr/local/gkb/website/html 
 mkdir img-fp
 mkdir img-tmp
 chown -R www-data img-*

 cd /etc/apache2/sites-available
 ln -s /usr/local/gkb/website/conf/httpd.conf reactome.conf
 cd ../sites-enabled

 a2ensite reactome
 a2dissite default
 rm -f *default*

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

Apache Tomcat

Parts of the Reactome website are run as tomcat web applications. The tomcat software and web applications are included in the reactome download.


groupadd tomcat7
useradd -g tomcat7 -s /sbin/nologin -d /opt/tomcat/temp tomcat7
cd /usr/local/reactomes/Reactome/production
chown -R tomcat7:tomcat7 apache-tomcat-7.0.50
chown -R tomcat7:tomcat7 AnalysisService Solr RESTful

Starting the server

/etc/init.d/tomcat7 restart

Configuring tomcat to start on system boot

sudo update-rc.d tomcat7 defaults

Uninstall Reactome

To remove the reactome website and databases from your machine, use the following steps. You may need to adjust the paths if you customized your installation.

1) remove the symlinks from apache2 (as sudo, you might want to stop the apache2 server first)

 rm -f /etc/apache2/sites-enabled/reactome.conf
 rm -f /etc/apache2/sites-available/reactome.conf  

2) drop the databases

 mysql -uroot -pYourPasswd -e 'DROP DATABASE IF EXISTS gk_current'
 mysql -uroot -pYourPasswd -e 'DROP DATABASE IF EXISTS gk_current_dn'
 mysql -uroot -pYourPasswd -e 'DROP DATABASE IF EXISTS stable_identifiers'
 mysql -uroot -pYourPasswd -e 'DROP DATABASE IF EXISTS gk_wordpress'

3) If you are not using apache-tomcat for anything else, you can remove the startup script (as sudo, you might want to stop the tomcat7 server first)

rm -f /etc/init.d/tomcat7 

4) remove all reactome components (as sudo)

 rm -fr /usr/local/reactomes
 rm -f /usr/local/gkb