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
- This can be done withÂ
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 graphviz
,Âyum install graphviz-gd
Installing the BioQ web app
Some of these steps will require root/administrative privileges.Â
- 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.
- 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.
- 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.
- The BioQ installation directory will be accessed from the web via your web server
- BioQ is designed primarily for a Apache and Linux. A typical installation directory would be /var/www/html/bioq.
- The Apache user in the operating system, typically apache, should have all permissions for this directory (rwx in Unix).
- The precise svn command to checkout the code to the directory is svn co http://svn.saclab.net/bioq/trunk/main/web bioq
- Copy the file template_config.php to config.php and edit as necessary by following the instructions in the file.
- 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.
- Save the file template_BioQOptions.xml as BioqOptions.xml and edit as necessary by following the instructions in the file (similarly for WindowsBioqOptions.xml)
- 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.
- Make sure that only the web server user and administrative users have access to the options file
- Run the program init_mysql.php using PHP. In Unix the command would be "php init_mysql.php".
- If the script shows error messages, check the entries you made in config.php and BioqOptions.xml for any obvious syntax errors
- 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.
- Follow the instructions to configure MySQL for use with BioQ.
- 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.
- 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.
- Once the databases are loaded, the program perl/dbdoc/dbdoc_util.pl can be used with the dump command to create the required dumps.
- You must assign permissions to this directory so your apache web user has read and write access, such asÂ
chown -R apache.apache bioq
- Run "ant testLocal" to deploy and run basic tests that BioQ is accessible from a browser and pages are well formed
- 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.