Skip to content

Download & Installation

tomclegg edited this page Sep 14, 2010 · 63 revisions

Complete source code for Trait-o-matic is now available in the repository but lacks thorough commenting. The following are instructions detailing how code from the repository can be used to install a fully working mirror.

Prerequisites

From a fresh install of Ubuntu (Hardy Heron) on a virtual node with AMD64 processors, the following commands were issued:

Configuration of Apache and Sendmail settings then took place. In particular:

  • In /etc/hostname, the existing hostname was deleted and replaced by the fully qualified hostname
  • In /etc/hosts, the fully qualified hostname was inserted before the existing hostname
  • In /etc/mail/sendmail.mc, the existing hostname was deleted and replaced by the fully qualified hostname in the MASQUERADE_AS option, and all features were moved before MAILER_DEFINITIONS
  • In /etc/apache2/sites-available/default, ServerSignature On was replaced by ServerSignature Off
  • In /etc/apache2/sites-available/default, the following was added and/or modified:
  • In /etc/php5/apache2/php.ini, the following settings were modified to those values indicated below:

The following commands were then issued:

sudo chown www-data:www-data /var/www
sudo chmod 777 /var/www
sudo apache2ctl graceful
sudo sendmailconfig

Core

Trait-o-matic source can be retrieved by downloading from GitHub; core components were extracted and copied to /usr/share/trait, the necessary Pyrex extensions were compiled in-place, and then the XMLRPC init script (by which Trait-o-matic responds to requests) was copied to the correct directory and installed:

Databases, database users, and database tables were created for access to MySQL (note that it is advised to change the password from the default shakespeare, and that the file /usr/share/trait/config.py must be updated accordingly). The SQL commands issued were as follows:

Reference genome data were retrieved in 2bit format from UCSC and saved to the path indicated in /usr/share/trait/config.py (by default, /var/trait/hg18.2bit) and other data to be stored in database tables were retrieved from their respective sources:

Data tables were loaded with the following MySQL commands:

It is a peculiarity of the current storage system that permanent files are by default stored in /tmp; with a second volume mounted at /scratch with more ample storage space, /tmp was then moved to /scratch/tmp and configured not to be wiped on reboot:

sudo mv /tmp /scratch/tmp
sudo ln -s /scratch/tmp /tmp
sudo sed -i'.bak' 's/TMPTIME=0/TMPTIME=-1/' /etc/default/rcS

Then, the Trait-o-matic core XMLRPC server was started:

sudo /etc/init.d/trait.sh start

Web

CodeIgniter (1.7.1) was downloaded and installed. (Note: web components are compatible with CodeIgniter versions 1.7.0 and 1.7.1; other versions have not been tested.)

cd
wget http://codeigniter.com/download.php
unzip CodeIgniter_1.7.1.zip
cd CodeIgniter_1.7.1
sudo cp index.php /var/www
sudo cp -R system /var/www/system
sudo mv -i /var/www/index.html /var/www/index.html.default

Then, Trait-o-matic web components were copied into the correct directories:

cd
sudo cp -R xwu-trait-o-matic-*/web/errors /var/www
sudo cp -R xwu-trait-o-matic-*/web/media /var/www
sudo cp -R xwu-trait-o-matic-*/web/scripts /var/www
sudo cp -R xwu-trait-o-matic-*/web/statistics /var/www
sudo rm -Rf /var/www/system/application
sudo cp -R xwu-trait-o-matic-*/web/system/application /var/www/system/application
sudo cp xwu-trait-o-matic-*/web/htaccess /var/www/.htaccess

Finally, /var/www/system/application/config/config.php was configured with the correct domain name. Additionally, database.php and upload.php were checked and updated with any necessary changes in setting.

Clone this wiki locally