TPP 4.5.2: Installing on Ubuntu 10.04.3

From SPCTools

(Difference between revisions)
Jump to: navigation, search
Revision as of 08:35, 7 August 2012
Sirlark (Talk | contribs)
(Installing prerequisites)
← Previous diff
Revision as of 06:18, 14 December 2012
Sirlark (Talk | contribs)
(Configuring your installation for use)
Next diff →
Line 60: Line 60:
$ chown -R www-data:www-data /usr/local/tpp/data $ chown -R www-data:www-data /usr/local/tpp/data
$ chown -R 0660 /usr/local/tpp/data $ chown -R 0660 /usr/local/tpp/data
-$ chown -R a+X /usr/local/tpp/data</pre>+$ chmod -R a+X /usr/local/tpp/data</pre>
=== Setting up apache === === Setting up apache ===

Revision as of 06:18, 14 December 2012

Contents

Before we begin

First some general notes

  • Run all these commands as root, we recommend running sudo su for convenience.
  • This installation assumes you are installing to /usr/local/tpp/, if you want to install anywhere else, change accordingly
  • This installation assumes you are using apache 2 as your web server
  • Where a block is presented with lines beginning with a dollar ($), these are commands to be typed in at the shell directly. You should be able to copy and paste them a line at a time.

Installation

Installing prerequisites

Use the ubuntu package manager to install all the dependencies

$ apt-get install g++ subversion vim apache2 libbz2-dev swig expat libpng12-dev
$ apt-get install gnuplot libperl-dev libxml-parser-perl build-essential libgd2-xpm libgd2-xpm-dev libboost-all-dev
$ apt-get install libboost-dev libboost-doc boost-build

Extracting and building the source

Extract TPP-4-5-2-src.tgz to /usr/local/src

$ cd /usr/local/src
$ tar xzf TPP-4-5-2-src.tgz

Create a new file /usr/local/src/TPP-4.5.2/src/Makefile.config.incl and populate it with

TPP_ROOT=/usr/local/tpp/
TPP_WEB=/tpp/
## for Boost
BOOST_INCL=-I/usr/include/boost/
BOOST_LIBDIR=/usr/lib
BOOST_LIBSPEC=-gcc43-mt
LINK=shared
LIBEXT=so
PERL_LIB_CORE= /usr/lib/perl/5.10/CORE/

Build TPP

$ make && make install

Copy any files from /usr/local/src/TPP-4.5.2/perl to /usr/local/tpp/bin if they don't exist there already

$ cp -n /usr/local/src/TPP-4.5.2/perl/* /usr/local/tpp/bin

Configuring your installation for use

Add local configuration data to /usr/local/tpp/cgi-bin/tpp_gui_config.pl. Add the following lines immediately after the line # SET TPP_GUI DEFAULTS HERE. Nothing along these paths can be a symlink, because the TPP web client (Petunia) resolves absolute paths and checks those against the config, which means symlinks will look like they're outside of the allowed directories. You can probably get around this with some funky apache configuration using URL rewrites, but that's too complex to go into here, and not necessary generally. Note the trailing slashes, they are important!

 'base_dir' => '/usr/local/tpp/',
 'www_root' => '/usr/local/tpp/',
 'data_dir' => '/usr/local/tpp/data/',
 'tppbin' => '/usr/local/tpp/bin/',

Create the data directory and set permissions and ownership so that apache can use it properly

$ cd /usr/local/tpp
$ mkdir data
$ mkdir data/parameters
$ cp /usr/local/tpp/bin/isb_default_* /usr/local/tpp/data/parameters
$ chown -R www-data:www-data /usr/local/tpp/data
$ chown -R 0660 /usr/local/tpp/data
$ chmod -R a+X /usr/local/tpp/data

Setting up apache

Now we need to tell apache about the TPP installation. Create a new file /etc/apache2/sites-available/tpp-x.y.z and populate with

<VirtualHost *:80>

        # directory to store data for web browser viewing
        Alias /tpp/data "/usr/local/tpp/data"
        <Directory "/usr/local/tpp/data">
                AllowOverride None
                Options Indexes +FollowSymLinks Includes
                Order allow,deny
                Allow from all
        </Directory>

        # directory for tpp's html resources (css, js, images, etc)
        Alias /tpp/html "/usr/local/tpp/html"
        <Directory "/usr/local/tpp/html">
                AllowOverride None
                Options Includes Indexes FollowSymLinks MultiViews
                Order allow,deny
                Allow from all
        </Directory>

        # directory for tpp's schema resources
        <Directory "/usr/local/tpp/schema">
                AllowOverride None
                Options Includes Indexes FollowSymLinks MultiViews
                Order allow,deny
                Allow from all
        </Directory>

        # directory for tpp's executable files
        ScriptAlias /tpp/cgi-bin "/usr/local/tpp/cgi-bin"
        <Directory "/usr/local/tpp/cgi-bin">
                #AllowOverride AuthConfig Limit
                AllowOverride All
                Options Indexes +FollowSymLinks MultiViews ExecCGI +Includes
                AddHandler default-handler .jpg .png .css .ico .gif
                AddHandler cgi-script .cgi .pl
                Order allow,deny
                Allow from all
                SetEnv WEBSERVER_ROOT /usr/local/
                #SetEnv WEBSERVER_ROOT /var/www
        </Directory>
</VirtualHost>

TPP produces pepxml files but links to them as .shtml in the putunia gui. We need to enable the SSI includes module to make these links work, which is not enabled by default in ubuntu server. You can see whether you already have the includes module enabled by running

$ apache2ctl -M

If the list contains "include_module" then you've already got it enabled, if not, enable it by running

$ a2enmod include

Finally, we enable the virtual host we've just created

$ a2ensite tpp-x.y.z
$ /etc/init.d/apache2 restart

And now you're good to go ... head on over to http://localhost/tpp/cgi-bin/tpp_gui.pl; And you can give up your root shell now by issuing the command

$ exit

Installing the tutorial data (optional)

If you want to test your installation using the SPC demo/tutorial data (yeast ORF data) then there are a few extra steps. First create a demo directory in the data area

$ mkdir /usr/local/tpp/data/demo

Extract all the example files (mzXML, tandem params, fasta database) to /usr/local/tpp/data/demo

You'll also need to create a download directory for SpectraST libraries.

$ mkdir -p /usr/local/tpp/data/dbase/speclibs

Set the permissions and ownership

$ chown -R www-data:www-data /usr/local/tpp/data/demo /usr/local/tpp/data/dbase
$ chmod -R 0660 /usr/local/tpp/data/demo /usr/local/tpp/data/dbase
$ chmod -R a+X /usr/local/tpp/data/demo /usr/local/tpp/data/dbase

The tandem.xml parameters file has a hard coded path that is windows specific. You will need to change the windows path to isb_default_input_kscore.xml in tandem.xml to the correct Linux path. The file can normally be found in linux instalaltions at /usr/local/tpp/bin/isb_default_input_kscore.xml, but if you've followed these instructions, you will have copied it to /usr/local/data/parameters already.

Replace "C:\InetPub\wwwroot\ISB\data\parameters\isb_default_input_kscore.xml" with "/usr/local/tpp/data/parameters/isb_default_input_kscore.xml" in the tandem.xml file.

Personal tools