Installation and Configuration

BioQ is a LAMP web application (Linux-Apache-MySQL-PHP).  This section describes how to install the BioQ web application on a Linux server using Apache.

System Requirements

PHP

  • Must install package php-mysql
    • This can be done with yum install php-mysql in some distributions of Linux
    • Apache may need to be restarted to work properly with PHP

Required Perl modules

  • In Linux/Unix, try using perl -MCPAN -e shell to install Perl modules. After executing this command, try "install <module>" in the CPAN dialog
  • Spreadsheet::WriteExcel
    • Try i /Spreadsheet-WriteExcel/  in CPAN to find the latest version
    • Try install JMCNAMARA/Spreadsheet-WriteExcel-2.37.tar.gz in CPAN
  • Proc::Simple
  • XML::XPath
  • Term::ReadKey

Other software requirements

  • Graphviz
    • Install packages graphviz and graphviz-gd
    • Try using yum install graphvizyum install graphviz-gd

Installing the BioQ web app

Some of these steps will require root/administrative privileges. 

  1. Download and install the Databases to be used in the BioQ application. Note that some of these are required, and some are already included in Subversion.
    1. Note that the documentation database, bioq_dbdoc, is special and is tracked on subversion. The table bioq_dbdoc.refererence contains and item "svn-revision" that is shown on the BioQ main page at the bottom. When maintaining BioQ, because the bioq_dbdoc must be loaded manually, is it important to keep track of which revision of the bioq_dbdoc database is being used.
  2. Checkout code from subversion: https://svn.saclab.net/bioq/trunk/main/web to a directory that will be referred to as the BioQ installation directory.
    1. The BioQ installation directory will be accessed from the web via your web server
    2. BioQ is designed primarily for a Apache and Linux. A typical installation directory would be /var/www/html/bioq.
    3. The Apache user in the operating system, typically apache, should have all permissions for this directory (rwx in Unix).
    4. The precise svn command to checkout the code to the directory is svn co http://svn.saclab.net/bioq/trunk/main/web bioq
  3. Copy the file template_config.php to config.php and edit as necessary by following the instructions in the file.
    1. In particular you must uncomment the 2 "define" lines under "SET INSTALLATION DIRECTORY" and define the PHP constants BIOQ-ROOT-DIR and LOCATION-BIOQ-OPTIONS-FILE. BIOQ-ROOT-DIR is a directory path in the operating system, not a URL. In a Linux installation, this may be a directory within /var/www/html. This directory should contain index.php.
  4. Save the file template_BioQOptions.xml as BioqOptions.xml and edit as necessary by following the instructions in the file (similarly for WindowsBioqOptions.xml)
    1. In particular, you must specify a MySQL user, such as "bioq", and a  password that will be used by the BioQ application. This information will be used to configure MySQL in a later step.
    2. Make sure that only the web server user and administrative users have access to the options file
  5. Run the program init_mysql.php using PHP. In Unix the command would be "php init_mysql.php".
    1. If the script shows error messages, check the entries you made in config.php and BioqOptions.xml for any obvious syntax errors
    2. You will be prompted to enter a MySQL user that has grant privileges - the default is root. You must also enter the password for this user.
    3. Follow the instructions to configure MySQL for use with BioQ.
    4. When the program init_mysql.php is finished, you must follow in the instructions in the final output to change the permissions of the file "passwd" so that only administrators have access.
  6. For the downloads section of BioQ to work, specialized "dumps" of the databases must exist in the BioQ dumps directory, which is specified by the option bioq_dump_dir in the file BioqOptions.xml.
    1. Once the databases are loaded, the program perl/dbdoc/dbdoc_util.pl can be used with the dump command to create the required dumps.
  7. You must assign permissions to this directory so your apache web user has read and write access, such as chown -R apache.apache bioq
  8. Run "ant testLocal" to deploy and run basic tests that BioQ is accessible from a browser and pages are well formed
  9. If you are developing, to have the dbDoc database store the Subversion revision number run svn propset:keywords "Revision" bioq_dbdoc.sql in the directory web/databases.