Skip to content
jimallman edited this page Sep 21, 2014 · 21 revisions

The Fossil Calibrations website is built using a typical LAMP stack (Linux, Apache, MySQL, PHP). Here are the versions of each that we've used in development:

These should be considered minimum versions in all cases. Newer versions should work as well or better, but may require tweaks to configuration or (rarely) source code.

Once these are in place, you'll need to:

  1. Secure a domain name and install a matching SSL cert (possibly self-signed) for admin access.

  2. Clone the FossilCalibrations repository. (I'm using /path/to/local/ in these examples, but you should replace this in all steps with something more sensible.)

cd /path/to/local
git clone [email protected]:NESCent/FossilCalibrations.git
  1. Configure Apache to read the website from the root folder of the local repo. (This can usually be done in /etc/httpd/conf.d/ or /etc/apache2/httpd.conf or /etc/apache2/extras/httpd-vhosts.conf, depending on the apache version and your preferred layout.)
<VirtualHost *:80> 
   ServerAdmin [email protected] 
   DocumentRoot /path/to/local/FossilCalibrations 
   ServerName fossils.mysite.com  
</VirtualHost>
  1. Configure Apache to support secure admin access via HTTPS. (This might be done in /etc/httpd/conf.d/ or /etc/apache2/httpd.conf or /etc/apache2/extras/httpd-ssl.conf, depending on the apache version and your preferred layout.)
<VirtualHost _default_:443>
   DocumentRoot /path/to/local/FossilCalibrations
   ServerName fossils.mysite.com:443
   ...
  1. Configure MySQL to support recursive stored procedures with thread_stack. (This is usually done in /etc/my.conf.)
[mysqld]
thread_stack = 1920K

Recursive functions also rely on max_sp_recursion_depth, but this is handled in the code for each recursive procedure.

  1. As MySQL's root user, install the latest FCD database as FossilCalibration. This can most easily be done using simple dump + import operations from the latest dev site (or directly from the developers). NOTE that this database uses stored procedures extensively; moving these requires the --routines option to mysqldump!

[TODO: Provide a skeleton database in the repo. This should define the structure for all tables and supporting data in some, plus the latest triggers, functions, and stored procedures. This should supercede the migration scripts etc. in the repo's db/ directory. But the dump files are super-verbose and not great for grepping or editing...]

  1. Configure PHP to support automatic session init for each request and enable short tags. (This is generally in /etc/php.ini, but as usual this file's location may vary.)
session.auto_start = 1
short_open_tag = On
  1. Configure PHP with sensitive information.
  • Create Site.conf in the site root, from Site.conf.EXAMPLE.
  • Add usernames and passwords for MySQL and privileged website users.
  • Replace any dummy values that include 'REPLACE' or 'EXAMPLE'.
  1. Once all processes have been (re)started, the Fossil Calibrations website should now be available at the expected address.

  2. Before users can browse or enter new calibrations, you'll need to login to the site as an administrator (using the login link in the site footer), then run these site maintenance tasks on the Admin Dashboard page:

  • Rebuild all calibration trees
  • Update searchable multitree
  • Update calibrations-by-clade table
  • Update auto-complete lists

(NOTE that the final task Upload and import NCBI taxonomy is a placeholder. Currently these uploads must be done manually.)