Installation of Reactome database and website
This document describes installation of Reactome database and setup for situations where you don't have or don't want to use root privileges. You do need to have wget, gunzip, tar, gcc and (gnu) make. Please make sure that those occur in your path and that the "right" one comes 1st.
Create a directory where you want to install the Reactome stuff. This directory will be self-contained, i.e. the installed code should not need anything from outside and nothing will be installed outside this directory.
mkdir GK
Enter this directory
cd GK
Let's call this the Reactome root directory. You can find the full path by issuing either:
echo $PWD
or
pwd
Non-Reactome software
Perl
Install your "own" Perl. The point is that this way you can freely write into this perl's lib directory and don't have to mess with "use libs", "prefixes" and suchlike. Installation should be fairly painless.
Download the source from http://www.cpan.org/src/stable.tar.gz:
wget http://www.cpan.org/src/stable.tar.gz
Unpack it:
gunzip -c stable.tar.gz | tar xvf -
Enter the created perl-<version> (currently 5.8.2) directory.
cd perl-<version>
Configure and compile perl. The parameters passed to the Configure script tell it to install perl as <path to Reactome root directory>/bin/perl and otherwise use default parameters (if you omit -de you'll enter an interactive session with the script and have to answer to numerous questions)
sh Configure -Dprefix=<path to Reactome root directory> -de
make
make test
make install
You may also want to prepend <path to Reactome root directory>/bin to your path.
Go back to Reactome root dir.
MySQL
Use the latest production release (currently 4.0). Go to the MySQL download page (http://www.mysql.com/downloads/mysql-4.0.html) and choose the precompiled binaries appropriate for your platform. (If, for whatever reason, you want to compile it yourself you can opt for source download.)
Unpack the distribution, which will create the installation directory. Then create a symbolic link to that directory:
gunzip -c mysql-VERSION-OS.tar.gz | tar xvf -
ln -s mysql mysql-VERSION-OS
Enter the installation directory and "install" the binary:
cd mysql
scripts/mysql_install_db
Note that the latter also printed out instructions for setting the root password. More can be found in MySQL documentation.
Start mysql server:
bin/mysqld_safe &
You may also want to add <path to Reactome root directory>/mysql/bin to your path.
Go back to Reactome root dir.
Perl modules
Necessary modules not included in the perl distribution are:
wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.38.tar.gz
gunzip -c DBI-1.38.tar.gz | tar xvf -
cd DBI-1.38
<path to Reactome root directory>/bin/perl Makefile.PL
make
make test
make install
cd ..
DBD:
wget http://search.cpan.org/CPAN/authors/id/R/RU/RUDY/DBD-mysql-2.9003.tar.gz
gunzip -c DBD-mysql-2.9003.tar.gz | tar xvf -
cd DBD-mysql-2.9003
<path to Reactome root directory>/bin/perl Makefile.PL \
--cflags=-I<path to Reactome root directory>/mysql/include \
--libs="-L<path to Reactome root directory>/mysql/lib -lmysqlclient -lz"
make
make test
make install
cd ..
Storable:
wget http://search.cpan.org/CPAN/authors/id/A/AM/AMS/Storable-2.09.tar.gz
gunzip -c Storable-2.09.tar.gz | tar xvf -
cd Storable-2.09
<path to Reactome root directory>/bin/perl Makefile.PL
make
make test
make install
cd ..
Bioperl:
wget http://www.bioperl.org/DIST/bioperl-1.2.3.tar.gz
gunzip -c bioperl-1.2.3.tar.gz | tar xvf -
cd bioperl-1.2.3
<path to Reactome root directory>/bin/perl Makefile.PL < /dev/null
make
make test
make install
cd ..
Apache with mod_perl
Please note the "switching" between apache and mod_perl directories below.
wget http://apache.mirror.positive-internet.com/httpd/apache_1.3.29.tar.gz
gtar xvzf apache_1.3.29.tar.gz
wget http://perl.apache.org/dist/mod_perl-1.0-current.tar.gz
gtar xvzf mod_perl-1.0-current.tar.gz
mkdir apache
cd apache_1.3.29
./configure
cd ../mod_perl-1.29/
<path to Reactome root directory>/bin/perl Makefile.PL \
APACHE_SRC=../apache_1.3.29/src \
DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
make
make install
cd ../apache_1.3.29
./configure --enable-module=include --prefix=<path to Reactome root directory>/apache
make
make install
cd ..
Reactome code and data
Reactome code
Download the distribution and move the content to appropriate places (there is no Makefile).
wget http://www.reactome.org/download/current/GKB.tar.gz
gunzip -c GKB.tar.gz | tar xvf -
mv GKB/modules/GKB lib/perl5/site_perl/
mv GKB/website .
rm -rf GKB
Edit the cgi scripts to use "your". Replace path to #!/usr/loca/bin/perl with #!<path to Reactome root directory>/bin/perl in the files in website/cgi-bin directory.
Edit the apache configuration file. Replace /usr/local/gkb with <path to Reactome root directory> in website/conf/httpd.conf.personal.
Reactome data
Download Reactome database dump:
wget http://www.reactome.org/download/current/sql.gz
Create a database and upload the data. In this case the database will be named test_gk_current. By default mysql server allows anonymous connections from localhost and manipulation of databases with name starting with 'test'.:
echo "drop database if exists test_gk_current" |\
<path to Reactome root directory>/mysql/bin/mysql
echo "create database test_gk_current" |\
<path to Reactome root directory>/mysql/bin/mysql
gunzip -c sql.gz |\
<path to Reactome root directory>/mysql/bin/mysql test_gk_current
If you want to give your database a different name you will also need to change the value of $GK_DB_NAME variable in <path to Reactome root directory>/lib/perl5/site_perl/GKB/Config.pm. This file also specifies the name name of the database server ($GK_DB_HOST, default value 'localhost'), database user name ($GK_DB_USER, default undef), database user password ($GK_DB_PASS, default undef) and the port that mysql server listens ($GK_DB_PORT, default 3306). Edit them if you want to set things up differently.
Start Reactome webserver
<path to Reactome root directory>/apache/bin/httpd -f \
<path to Reactome root directory>/website/conf/httpd.conf.personal
Point your browser at http://localhost:8080 or http://127.0.0.1:8080