Install the prerequisites¶
The HRM requires a few prerequisites for its functions.
The HRM should work on any recent Linux distribution, but we only support Ubuntu (with its derivatives) and Fedora (that will apply to RHEL and CentOS). Distribution-specific differences are marked in the following with the corresponding distribution logos.
Please notice that with release 3.1, we dropped support for Mac OS X. HRM 3.0 is still known to work on Mac OS X from 10.5 (Leopard) onward, but no effort will be made to make future versions of the HRM compatible with Mac OS X. Also notice that the HRM was never tested on Mavericks. For reference, see the old documentation.
The HRM is an interface to Scientific Volume Imaging’s Huygens Core. Huygens Core is is a fully scriptable compute engine intended to run image processing and deconvolution jobs on large 64 bit multiprocessor servers in headless mode, i.e. without a specific graphical interface. The HRM provides such an interface for multi-user, batch access to Huygens Core.
If the web and the processing server are not on the same machine, you will need an additional Huygens Core for the web server with a reader license (free of charge).
Apache2 web server¶
sudo apt-get install apache2
sudo yum install httpd
Web pages can be installed globally or per-user.
The Apache2 global document root is
/var/www/html in more recent versions (14.04 LTS and newer).
The Apache2 global document root is
If you plan to install the HRM in a specific user directory, use
Apache2 access handling¶
.htaccess files to prevent access to configuration files. Make sure to set the
AllowOverride directive in
FIXME to enable
.htaccess files in the HRM on the web server (
AllowOverride All), or at least make sure to prevent access to the subdirectories
If you are installing the HRM in your user dir, make sure to change
FIXME (make sure to enable the userdir mod first by running
sudo a2enmod userdir in the shell).
See also Enabling use of Apache htaccess files.
PHP ≥ 5.3¶
The HRM is made of two parts, a web interface and a queue manager, both written in PHP but with different requirements. The web interface requires the PHP 5 module for Apache2, the queue manager requires the PHP 5 command line interpreter.
Minimum required PHP version is 5.3.
sudo apt-get install libapache2-mod-php5 php5 php5-cli php5-common php5-json
JSON support for PHP was moved into a separate package
php5-json in Ubuntu 14.04LTS; in older versions, JSON support is part of the core
sudo yum install php php-cli php-common php-process php-json
A relational database¶
The HRM officially supports two relational databases: MySQL and PostgreSQL.
sudo apt-get install php5-mysql mysql-server
sudo yum install php-mysql php-pdo mysql-server
It is recommended to install a database management tool like
sudo apt-get install php5-pgsql postgresql
sudo yum install php-pgsql postgresql-server postgresql-contrib
You will need to manually enable PostgreSQL:
sudo systemctl enable postgresql
It is recommended to install a database manageent tool like
Some additional information:
- This is a good tutorial from the Ubuntu Community on how to set up PostgreSQL to use with the HRM.
(Optional) LDAP support¶
sudo apt-get install php5-ldap
sudo yum install php-ldap
HRM uses the PHP
mail() function to notify the users:
“For the Mail functions to be available, PHP must have access to the sendmail binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them.” More...
sudo apt-get install postfix
sudo yum install postfix
If your mail server is set up correctly and still PHP cannot send e-mails, SELinux might be blocking it. Query the status of
httpd_can_sendmail as follows:
$ /usr/sbin/getsebool httpd_can_sendmail
off, you can enable it with:
$ /usr/sbin/setsebool -P httpd_can_sendmail on
PHP date() and default timezone¶
Please make sure to set the default timezone in php.ini as follows:
[Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = "Europe/Zurich"
Otherwise you will get the following warning every time the PHP function date() is called within the HRM:
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. (...)
Click here for the full list of supported time zones.
If the queue manager and the image processing server are not on the same machine (see installation instructions), HRM transfers files via ssh between the two using
sudo. To allow HRM to login and run commands as sudo via remote, it is necessary to comment out the line
'Defaults requiretty' in the
The HRM compresses files to be downloaded (such as deconvolution results). Several options are possible (and more can be added in the configuration files), but by default the HRM uses
sudo apt-get install zip
sudo yum install zip
(Optional) OMERO support¶
If you plan to use the OMERO connector, you will need to download the “server” package from the OMERO website that matches your existing OMERO installation and the Ice version installed on your HRM system. To make it work on your system, you also need Python 2.6 or 2.7 and (which is installed by default on Fedora and Ubuntu) and Java 7. If the Python Imaging Library (PIL) is installed, the connector will download thumbnails as well to use them as previews in the HRM side bar. Those “simple” previews can of course be replaced with the HRM ones by clicking on the “Re-generate Preview” link.
It is NOT required to do any installation or configuration of the downloaded OMERO package! HRM just needs this package as a means to communicate with your existing installation of OMERO server. Thus, this package allows HRM to communicate with any OMERO server connected to the network.
As an example on how to download these packages, the
commands used to fetch
OMERO 5.0.3 and
Ice 3.4 are shown below. For other
combinations please have a look at the OMERO download site. We recommend placing the
“server” package into a subdirectory of
/opt/OMERO, as follows:
sudo apt-get install python-zeroc-ice python-imaging libicessl34 openjdk-7-jre wget http://downloads.openmicroscopy.org/omero/5.0.3/artifacts/OMERO.server-5.0.3-ice34-b41.zip -O /tmp/OMERO.server.zip sudo mkdir -pv /opt/OMERO cd /opt/OMERO sudo unzip /tmp/OMERO.server.zip rm /tmp/OMERO.server.zip
sudo yum install ice-python python-imaging java-1.7.0-openjdk wget http://downloads.openmicroscopy.org/omero/5.0.3/artifacts/OMERO.server-5.0.3-ice34-b41.zip -O /tmp/OMERO.server.zip sudo mkdir -pv /opt/OMERO cd /opt/OMERO sudo unzip /tmp/OMERO.server.zip rm /tmp/OMERO.server.zip
Due to an issue in the OMERO
5.0.x series there’s an attempt to store
and read OMERO session files in a subfolder of the user’s HOME directory
who executes OMERO queries - in our case the same user that is running
Apache. This will fail on most standard installations due to the default
directory permissions in Apache’s document root, therefore it is necessary
to manually create this session directory and adjust the permissions
accordingly, as follows:
sudo mkdir /var/www/omero sudo chown www-data /var/www/omero sudo chmod u+w /var/www/omero
Please contact us in case you’re trying to set up the OMERO connector on a Fedora system and you’re running into trouble there!