TPP:Installing on Ubuntu 7.04

From SPCTools

(Difference between revisions)
Jump to: navigation, search
Revision as of 17:06, 1 June 2007
Dfermin (Talk | contribs)

← Previous diff
Revision as of 17:21, 1 June 2007
Dfermin (Talk | contribs)

Next diff →
Line 22: Line 22:
! Maintainer ! Maintainer
! Ubuntu Packages to get ! Ubuntu Packages to get
-|-+|-| libgd
-| libgd+
| www.boutell.com/gd | www.boutell.com/gd
| libgd-dev | libgd-dev
Line 123: Line 122:
Original Author: Damian Fermin (''dfermin'' at the University of Michigan, Ann Arbor) Original Author: Damian Fermin (''dfermin'' at the University of Michigan, Ann Arbor)
 +
 +
 +
 +== Custom <code> httpd.conf </code> file ==
 +This is the httpd.conf file I used for my implementation of TPP. It worked for me, I hope it works for you but again this file is provided with ''no'' guarantee of any kind.
 +<code><pre>
 +
 +# This file hosts 2 servers from localhost: 1) TPP and 2) CPAS
 +
 +
 +# where Apache2 install actually lives on filesystem
 +ServerRoot "/usr/local/apps/apache2"
 +
 +
 +# Fully qualified name for server
 +ServerName localhost
 +
 +# User accounts to use for Apache processes
 +<IfModule !mpm_netware_module>
 +User daemon
 +Group daemon
 +</IfModule>
 +
 +# Contact info. for when people break the machine
 +ServerAdmin dfermin@umich.edu
 +
 +
 +# Sets the file Apache will server if a directory is requested
 +<IfModule dir_module>
 + DirectoryIndex index.html
 +</IfModule>
 +
 +# Prevents access to .htaccess and .htpasswd files
 +<FilesMatch "^\.ht">
 + Order allow,deny
 + Deny from all
 + Satisfy All
 +</FilesMatch>
 +
 +# Default MIME type the server will use for documents if it can't
 +# figure one out for a given file extension
 +DefaultType text/plain
 +
 +<IfModule mime_module>
 + TypesConfig conf/mime.types
 + AddType application/x-compress .Z
 + AddType application/x-gzip .gz .tgz
 + AddType text/html .shtml
 + AddHandler server-parsed .shtml
 + AddOutputFilter INCLUDES .shtml
 +</IfModule>
 +
 +# Secure (SSL/TLS) connections
 +<IfModule ssl_module>
 +SSLRandomSeed startup builtin
 +SSLRandomSeed connect builtin
 +</IfModule>
 +
 +
 +## Ports to listen on for TPP
 +Listen 80
 +NameVirtualHost 127.0.0.1:80
 +
 +
 +## Ports to listen on for CPAS
 +#Listen 8080
 +#NameVirtualHost 127.0.0.1:8080
 +
 +
 +######################### TPP Server Configuration ############################
 +<VirtualHost 127.0.0.1:80>
 + ## IP address _AND_ port to access this server on
 + ServerName 127.0.0.1:80
 + DocumentRoot /usr/local/apps/tpp
 + SetEnv WEBSERVER_ROOT /usr/local/apps/tpp
 +
 + # file where errors are recorded and what level of recording is done
 + ErrorLog logs/tpp-errors.log
 + LogLevel warn
 +
 + # Access logs
 + <IfModule log_config_module>
 + # Directives defining formatting of access log output
 + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
 + LogFormat "%h %l %u %t \"%r\" %>s %b" common
 +
 + <IfModule logio_module>
 + # You need to enable mod_logio.c to use %I and %O
 + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
 + </IfModule>
 + CustomLog logs/tpp_access_log common
 + </IfModule>
 +
 +
 +
 + ## Global directives for TPP configuration
 + <Directory "/usr/local/apps/tpp">
 + Options Indexes FollowSymLinks
 + AllowOverride None
 + Order allow,deny
 + Allow from all
 + </Directory>
 +
 + # directory to store data for web browser viewing
 + Alias /tpp/data "/usr/local/apps/tpp/data"
 + <Directory "/usr/local/apps/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/apps/tpp/html"
 + <Directory "/usr/local/apps/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/apps/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/apps/tpp/cgi-bin/"
 + <Directory "/usr/local/apps/tpp/cgi-bin">
 + AllowOverride AuthConfig Limit
 + Options Indexes FollowSymLinks MultiViews ExecCGI +Includes
 + Order allow,deny
 + Allow from all
 + SetEnv WEBSERVER_ROOT /usr/local/apps/tpp
 + </Directory>
 +</VirtualHost>
 +##############################################################################
 +
 +########################## CPAS Configuration ################################
 +# Not relevant to this TPP HowTo so you can delete this section
 +##############################################################################
 +</pre></code>

Revision as of 17:21, 1 June 2007

Contents

Disclaimer

These instructions are provided with no guarantees of any kind. These steps worked for me. I hope they work for you but don’t hold me responsible if you make your system inoperable by following these directions.

Background

You will need to have the basic programming packages installed beforehand. Get them by typing the following at the command line:

sudo apt-get install build-essential

When prompted to, enter your user password.

Prerequisite Packages

There are several packages that you need to have installed. The list is provided below. You can find them for Ubuntu using the search feature of this webpage: http://packages.ubuntu.com/

Package Name Maintainer Ubuntu Packages to get
www.boutell.com/gd libgd-dev
libpng www.libpng.org libpng12-dev
zlib www.gzip.org/zlib zlib1g-dev
boost www.boost.org libboost*
expat expat.sourceforge.net libexpat1-dev
gnuplot www.gnuplot.info gnuplot

All of these packages can be installed with this command: sudo apt-get install package name. You can check to see if you have the libraries installed using this command: dpkg -l package name

Install Apache Server

For whatever reason, the apache version for Ubuntu 7.04 from the repositories did not work for me so I compiled mine from source. I used version 2.2.4 and installed it to /usr/local/apps/apache2. I downloaded the source code from http://httpd.apache.org/download.cgi. Once you have the source code, these are the commands I typed:

sudo su
tar xzf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apps/apache2
make
make install

Start apache: /usr/local/apps/apache/bin/apachectl -k start. Open your browser and go to http://localhost . If everything is okay, you should see a webpage that says ”It works!”.

Now modify the apache server configuration file. At the end of this HowTo is the httpd.conf file that I used. You can copy and paste the text into a blank file and save it as httpd.conf.tpp. Then backup the default apache2 httpd.conf file and replace it with mine. Here are the commands for after you’ve saved my httpd.conf file as httpd.conf.tpp:

cd /usr/local/apps/apache2/conf
mv httpd.conf httpd.conf.original
mv /current/directory/of/httpd.conf.tpp /usr/local/apps/apache2/conf
ln -s httpd.conf.tpp httpd.conf

Restart the httpd daemon:

/usr/local/apps/apache/bin/apachectl -k restart

Go back to http://localhost and see if you still get the same webpage.


Compiling TPP

Download the TPP package (http://sourceforge.net/project/showfiles. php?group_id=69281&package_id=126912. As of this writing, the current version is 3.0.3. Once you have the tarball here's what you do:

tar xzf TPP_v3.0.3_SQUALL.zip
cd trans_proteomic_pipeline/src

Using your favorite editor, open up the Makefile.incl file and set TPP ROOT variable to be where you want the installation to go. In my case I wanted to install it to /usr/local/apps/tpp so that is the value I used. When you’re done, save your changes.

Back at the terminal, from within the src directory type:

make configure
make
sudo make install

As a final step, I created a data directory within my TPP install that is "world accessible". This means anyone can dump data in to this directory for running/viewing proteomics data through the pipeline. I've included the commands for making the directory here:

sudo mkdir /usr/local/apps/tpp/data
sudo chmod 777 /usr/local/apps/tpp/data

Note that the directory is completely accessible to everyone so don't put confidential or mission-critical stuff in this folder.

I did run into one minor nuisance: the nice command in Ubuntu 7.04 is installed at /usr/bin/nice. TPP expects to find it at /bin/nice. To deal with this, I just added a link:

sudo ln -s /usr/bin/nice /bin/nice

This is by no means an exhaustive HowTo and additions/improvement/comments are welcome.


Original Author: Damian Fermin (dfermin at the University of Michigan, Ann Arbor)


Custom httpd.conf file

This is the httpd.conf file I used for my implementation of TPP. It worked for me, I hope it works for you but again this file is provided with no guarantee of any kind.


# This file hosts 2 servers from localhost: 1) TPP and 2) CPAS


# where Apache2 install actually lives on filesystem
ServerRoot "/usr/local/apps/apache2"


# Fully qualified name for server
ServerName localhost

# User accounts to use for Apache processes
<IfModule !mpm_netware_module>
User daemon
Group daemon
</IfModule>

# Contact info. for when people break the machine
ServerAdmin dfermin@umich.edu


# Sets the file Apache will server if a directory is requested
<IfModule dir_module>
	DirectoryIndex index.html
</IfModule>

# Prevents access to .htaccess and .htpasswd files
<FilesMatch "^\.ht">
	Order allow,deny
	Deny from all
	Satisfy All
</FilesMatch>

# Default MIME type the server will use for documents if it can't 
# figure one out for a given file extension
DefaultType text/plain

<IfModule mime_module>
	TypesConfig conf/mime.types
	AddType application/x-compress .Z
	AddType application/x-gzip .gz .tgz
	AddType text/html .shtml
	AddHandler server-parsed .shtml
	AddOutputFilter INCLUDES .shtml
</IfModule>

# Secure (SSL/TLS) connections
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>


## Ports to listen on for TPP
Listen 80
NameVirtualHost 127.0.0.1:80


## Ports to listen on for CPAS
#Listen 8080
#NameVirtualHost 127.0.0.1:8080


######################### TPP Server Configuration ############################
<VirtualHost 127.0.0.1:80>
	## IP address _AND_ port to access this server on
	ServerName 127.0.0.1:80
	DocumentRoot /usr/local/apps/tpp
	SetEnv WEBSERVER_ROOT /usr/local/apps/tpp
	
	# file where errors are recorded and what level of recording is done
	ErrorLog logs/tpp-errors.log
	LogLevel warn
	
	# Access logs
	<IfModule log_config_module>
		# Directives defining formatting of access log output
		LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
		LogFormat "%h %l %u %t \"%r\" %>s %b" common

    		<IfModule logio_module>
      			# You need to enable mod_logio.c to use %I and %O
      			LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    		</IfModule>
		CustomLog logs/tpp_access_log common
	</IfModule>
	
	

	## Global directives for TPP configuration
	<Directory "/usr/local/apps/tpp">
		Options Indexes FollowSymLinks
		AllowOverride None
		Order allow,deny
		Allow from all
	</Directory>	

	# directory to store data for web browser viewing
	Alias /tpp/data "/usr/local/apps/tpp/data"
	<Directory "/usr/local/apps/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/apps/tpp/html"
	<Directory "/usr/local/apps/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/apps/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/apps/tpp/cgi-bin/"
	<Directory "/usr/local/apps/tpp/cgi-bin">
    		AllowOverride AuthConfig Limit
    		Options Indexes FollowSymLinks MultiViews ExecCGI +Includes
    		Order allow,deny
    		Allow from all
    		SetEnv WEBSERVER_ROOT /usr/local/apps/tpp
	</Directory>
</VirtualHost>
##############################################################################

########################## CPAS Configuration ################################
# Not relevant to this TPP HowTo so you can delete this section
##############################################################################
Personal tools