TPP 4.5.2: Installing on Ubuntu 10.04.3

From SPCTools

(Difference between revisions)
Jump to: navigation, search
Revision as of 08:09, 8 February 2012
Sirlark (Talk | contribs)

← Previous diff
Revision as of 08:15, 8 February 2012
Sirlark (Talk | contribs)
(Configuring your installation for use)
Next diff →
Line 44: Line 44:
=== Configuring your installation for use === === Configuring your installation for use ===
-Add local configuration data to <code>/usr/local/tpp/cgi-bin/tpp_gui_config.pl</code>. Add the following lines *imemdiately after the line* <code># SET TPP_GUI DEFAULTS HERE</code>. Nothing along this path can be a symlink, becasue 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.+Add local configuration data to <code>/usr/local/tpp/cgi-bin/tpp_gui_config.pl</code>. Add the following lines '''immediately after the line''' <code># SET TPP_GUI DEFAULTS HERE</code>. 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!
<pre> 'base_dir' => '/usr/local/tpp/', <pre> 'base_dir' => '/usr/local/tpp/',

Revision as of 08:15, 8 February 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 depenecies

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

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/',
 'ttpbin' => '/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
$ chown -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>

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

$ cd /etc/apache2/sites-enabled
$ ln -sf ../sites-available/tpp-x.y.z 090-tpp
$ /etc/init.d/apache2 restart

And now you're good to go ... head on over to http://localhost/tpp/

Installaing 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

Set the permissions and ownership

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

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