To run CoNtRol on your own server or desktop, you will need a PHP-enabled web server such as Apache, and the packages glpk-utils
, libginac2
, maxima
and octave
installed on Debian/Ubuntu, or their equivalent for other OSes. You will also need Sage and (optionally) SCIP. For batch processing to work you will need a working database and mail server.
To build CoNtRol instead of using a pre-built copy, you will also need the packages build-essential
, libginac-dev
and libglpk-dev
or equivalent.
CoNtRol has only been tested on Ubuntu, Debian and Mac OS X 10.9.3, but we believe it should run straightforwardly on other Linux/BSD variants, including other OS X versions and Windows (via Cygwin). We welcome feedback and bug reports about installing and running CoNtRol on these systems.
Once you have a local copy of CoNtRol, either from a pre-built package or by following the build instructions below, simply drop it into the root folder of your website (see step 8 in the Mac OS X instructions below, or /var/www/html
in most Linux distros). CoNtRol has only been tested with Apache, but should work with any correctly configured web server that supports PHP, such as lighttpd or NGINX. For a local install without batch processing, the default config settings should work without modification. The default URL is http://127.0.0.1/control/.
For test/small installations, e.g. on a local desktop machine rather than a dedicated web server, if you want to enable batch processing we recommend using SQLite for the database and msmtp to send mail. These will need to be set up correctly, along with a cron job to periodically check for new batches. To create a cron job, run sudo nano /etc/cron.hourly/control
, paste in the following lines, save and make it executable with sudo chmod +x /etc/cron.hourly/control
):
#!/bin/sh
cd /var/www/html/control/cron
sudo -u www-data /var/www/html/control/cron/cron.php
For a shared server install with batch processing, we recommend using a more powerful database such as MariaDB (or MySQL). There is a database schema for MariaDB/MySQL in the sql
directory. Batch processing in CoNtRol will work with any database supported by PDO, including Microsoft SQL Server, Postgres, IBM DB2 and Oracle.
Setting up an email server is an advanced topic and beyond the scope of these instructions. If you would like assistance in configuring email sending, please contact pete dot donnell at port dot ac dot uk and we will do our best to help.
These notes will help you get the prerequisites set up to run CoNtRol on Mac OS X. You will need to be comfortable using the Terminal to enter commands. Note: these instructions have only been tested under Mac OS X Mavericks 10.9.3 using Homebrew. The instructions should be straightforward to adapt to different versions of OS X, and to MacPorts or Fink, but these have not been tested.
sudo nano /private/etc/apache2/httpd.conf
.
LoadModule php5_module libexec/apache2/libphp5.so
.<IfModule dir_module>
section, find the line beginning with DirectoryIndex
and add index.php
on the end.<Directory "/Library/WebServer/Documents">
section, change AllowOverride None
to AllowOverride Limit
.$PATH
variable to /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/local/bin
for the _www user. Use the command sudo nano /System/Library/LaunchDaemons/org.apache.httpd.plist
to edit the Apache config and follow these instructions.sudo apachectl restart
.ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
.coreutils
, ginac
, glpk
, maxima
and octave
with the command brew install <packagename>
.timeout
with the command sudo ln -s /usr/local/bin/gtimeout /usr/local/bin/timeout
.build.sh
script at the bottom of this page./Library/WebServer/Documents/control
is a sensible default).cd includes/ && cp config.php.dist config.php
nano config.php
and follow the notes it contains.sudo chown -R _www sql
.cd sql && sudo cp -a control.dist.sqlite control.sqlite
.Windows Cygwin builds to come.
git clone git://reaction-networks.net/control
git clone git://reaction-networks.net/dsrtest
git clone git://reaction-networks.net/injmat
cd control/includes/
cp config.php.dist config.php
nano config.php
cd ../applets/
wget https://reaction-networks.net/control/applets/collections-generic-4.01.jar
wget https://reaction-networks.net/control/applets/colt-1.2.0.jar
wget https://reaction-networks.net/control/applets/concurrent-1.3.4.jar
wget https://reaction-networks.net/control/applets/dsr.jar
wget https://reaction-networks.net/control/applets/jung-algorithms-2.0.1.jar
wget https://reaction-networks.net/control/applets/jung-api-2.0.1.jar
wget https://reaction-networks.net/control/applets/jung-graph-impl-2.0.1.jar
wget https://reaction-networks.net/control/applets/jung-visualization-2.0.1.jar
cd ../../
cp dsrtest/*.m dsrtest/dsr control/bin/
cd ../injmat/
./configure
make
bin
folder with
strip bin/test
cp bin/test ../control/bin/analysereacs
Alternatively, simply download our build script and run it with the command ./build.sh
. The script generates a zip archive and tar.gz archive of the functioning code, which you can then just extract to your web server root directory.