Non-Reactome software
Perl
Reactome Perl scripts expect the Perl to be at /usr/local/bin/perl. If your Perl installation is otherwise up-to-date but the path to it is different, an easy way to rectify the issue is to create a symbolic link at /usr/local/bin/perl pointing to your Perl executable. E.g. if your Perl is located at /usr/bin/perl, do
ln -s /usr/bin/perl /usr/local/bin/perl
Make sure you have version 5.8.0 or later. If not, install it:
Download the source from http://www.cpan.org/src/stable.tar.gz:
Unpack it:
tar xvzf stable.tar.gz
Enter the created perl-<version> directory.
cd perl-<version>
Configure and compile perl. "-des" makes the Configure script to use default parameters (if you omit it you'll enter an interactive session with the script and have to answer to numerous questions). "-Dprefix=/usr/local" specifies to install perl as "/usr/local/bin/perl". "-Dlibs='-lnsl -ldl -lm -lcrypt -lutil -lc'" instructs to use the specified libraries. W/o "-lm" make would die. "-Duseshrplib" enables shared libraries.
sh Configure -Dprefix=/usr/local -Dlibs='-lnsl -ldl -lm -lcrypt -lutil -lc' -Duseshrplib -des
make
make test
make install
You may also want to prepend /usr/local/bin to your path.
MySQL
The easiest way to install MySQL is to use the pre-compiled binaries from
http://dev.mysql.com. Although internally Reactome uses version 4.0, versions 4.1 and 5.0 (the stable release at the time of this writing) do also work. Please note, however, that Perl module DBD::mysql (version 4.001, latest at the tinme of this writing) does not compile against MySQL (mysql-standard-5.0.27-osx10.4-i686 , latest stable release at the time of this writing) on Mac OS X. Please use MySQL 4.1 at least for building DBD::mysql on Macs with Intel processors.
Download the appropriate standard binaries from http://dev.mysql.com/downloads/mysql.
Unpack the downloaded file with
tar xvzf MYSQL-VERSION-OS.tar.gz
Follow the straightforward installation instructions in the mysql/INSTALL-BINARY file.
Please note that your operating system may come with user and group "mysql" created and hence you can skip the 2 first steps.
Once the database is running, connect to it as root
/usr/local/mysql/bin/mysql -u root -p mysql
Please note that MySQL will ask you for the root password that you set up during the installation process. Just press the return key if you didn't set up the MySQL root password.
Add a MySQL user account that the Reactome web server will be using to connect to the database and retrieve data. In this example the user name is "reactome_user" and the password is "reactome_pass". These will be used later when configuring Reactome web code to access the database.
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
ON reactome.*
TO 'reactome_user'@'localhost'
IDENTIFIED BY 'reactome_pass';
Extend the user's permissions to any database with name containing "reactome":
mysql> UPDATE db SET Db='%reactome%'
WHERE User='reactome_user';
Perl modules
The Reactome website needs quite a few Perl modules to be installed in order for it to run. These modules can all be downloaded from www.cpan.org, and are all installed in much the same way: download the compressed archive, unpack in a working directory, and install the module:
tar xvzf module.tar.gz
cd module
/usr/local/bin/perl Makefile.PL
make
make test
make install
Please note that some of these modules require installation of further Perl modules. In addition, some of the modules depend on C libraries or executables that have to be installed before the Perl module in question can be installed successfully. Installation of these also follows similar pattern:
tar xvzf package.tar.gz
cd package
./configure
make
make install
Please note that the last step in both of the instructions above requires you to have the root privileges or execute the command as the root user. The latter is achieved by
sudo make install
List of required Perl modules, their purpose and dependencies is as follows. The dependencies are listed in the order in which they have to be installed.
Apache web server
If you don't have Apache web server already, you can download the source code from
http://httpd.apache.org/download.cgi. Although Reactome project itself uses version 1.3 of the Apache webserver, later versions (2.2.4 is the most recent one at the time of this writing) do also suffice. For installation instructions please follow the appropriate "Documentation" link on the web page.
Reactome code and data
Download Ractome website and Perl code, unpack it and move it to /usr/local/gkb:
Open /usr/local/gkb/modules/GKB/Config.pm with a text editor. Change the value of $JAVA_PATH to reflect the path to the Java (version1.5) executable on your system. Check that the value of $WWW_USER reflects the name of the OS user running the web server. On Mac OS X this is "www" while on unix/linux it tends to be "nobody".
This file also specifies the MySQL user name, password, port and name of the database the web server is using to connect to the database server. Make sure that values of $GK_DB_USER and $GK_DB_PASS are as specified in the MySQL installation step before.
Download Reactome data as MySQL database dumps. The 1st of those is the main database while the 2nd one is derived from the main database and supports the skypainter utility of the website.
Start the MySQL server if it is not running already:
cd /usr/local/mysql
bin/mysqld_safe &
cd -
Connect to the database server with MySQL command line client and create empty databases. The name of the main database has to be the same as the value of $GK_DB_NAME in Config.pm. The name of the skypainter database should be the name of the main database with "_dn" appended.
/usr/local/mysql/bin/mysql -u reactome_user -preactome_pass
mysql> CREATE DATABASE reactome;
mysql> CREATE DATABASE reactome_dn;
Fill the databases with downloaded data
gunzip -c sql.gz | /usr/local/mysql/bin/mysql -u reactome_user -preactome_pass reactome
gunzip -c sql_dn.gz | /usr/local/mysql/bin/mysql -u reactome_user -preactome_pass reactome_dn
Create the reaction map images and other files that will be used to create the front page of the website. This procedure create a directory with the same names as the main database in /usr/local/gkb/website/html/img-tmp. If you are updating your database rather than doing everything from the scratch, remove this directory first as otherwise the new files will not be created.
/usr/local/gkb/scripts/release/create_frontpage_files.pl
Make sure that the the web server can write into and read from the directory used to store the temporary images.
chmod 777 /usr/local/gkb/website/html/img-tmp
The latter makes /usr/local/gkb/website/html/img-tmp directory writable by anybody able to log into the server. If this seems too lax, assign the ownership of this directory to the OS user running the web server and make it writable by this user only.
Configure and start Reactome web server
Choose the web server configuration file for starting the web server. Reactome distribution comes with one configuration file (httpd.conf.static) for server with compiled-in modules and another one (httpd.conf.dso) for server which uses the Dynamic Shared Object (DSO) mechanism. Both of those files are located in the /usr/local/gkb/website/conf directory. Default Apache server installation compiles all the modules in. However, the server which comes with Mac OS X, for example, uses the DSO mechanism.
To determine if your web server has the relevant modules compiled in, invoke the httpd executable with "-l" command line parameter. If the output contains the following in the compiled in module list, use the httpd.conf.static file, otherwise use httpd.conf.dso.
mod_log_config
mod_mime
mod_include
mod_autoindex
mod_dir
mod_cgi
mod_alias
mod_access
mod_so
Start the web server with the appropriate configuration file. The following example assumes that the server has compiled-in modules
httpd -f /usr/local/gkb/website/conf/httpd.conf.static
If you are not logged in as the root user, execute the command via sudo. If the httpd executable is not in the root users path, you will have to specify the full path to the httpd executable, i.e. if it is located in /usr/local/apache/bin directory, do
sudo /usr/local/apache/bin/httpd -f /usr/local/gkb/website/conf/httpd.conf.static
If you have a browser on the same computer where you installed Reactome, point your browser at http://127.0.0.1, otherwise replace "127.0.0.1" with the name or IP address of the computer hosting your Reactome web site. You should see the front page of your Reactome installation.
How to shut down Reactome installation?
Stop the web server:
kill `cat /usr/local/gkb/website/logs/httpd.pid`
You have to execute this command as the root user.
Stop the MySQL server
/usr/local/mysql/bin/mysqladmin -u root -p shutdown
How to (re-)start Reactome installation?
You have to execute these commands as the root user.
Start the MySQL server
cd /usr/local/mysql
bin/mysqld_safe &
Start the web server:
httpd -f /usr/local/gkb/website/conf/httpd.conf.static