Install the prerequisites#
The HRM requires a few prerequisites for its functions.
If you have not yet read the conventions, please consult the Operating systems.
For those who plan on using the (Optional) OMERO support it is strongly recommended to set up the HRM and OMERO using the same Linux distribution and version, simply to avoid Ice version incompatibilities, which will prevent the HRM-OMERO connector from working. Details can be found in the OMERO system administrator documentation.
PLEASE MIND: this does NOT mean you should install HRM and OMERO on the same machine! You should just run the same Linux installation on them.
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 install apache2
sudo dnf install httpd sudo systemctl enable httpd
Web pages can be installed globally or per-user.
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 configure Apache2 to use them by setting the AllowOverride and Require directives in configuration files.
If you are installing HRM in your user directory also put the directives in
Make sure to enable the userdir mod first by running the follwing line in the shell:
sudo a2enmod userdir
See also Enabling use of Apache htaccess files.
/etc/httpd/conf.d/hrm.conf (the file has to be created)
If you are installing HRM in your user directory also put the directives in:
Please notice that the
Require directive is required from Apache version 2.4. Here is the code snippet for the config
<Directory /var/www/html/hrm> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Minimum required PHP version is 8.1.
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 module for Apache2, the queue manager requires the PHP command line interpreter.
sudo apt install \ libapache2-mod-php \ php \ php-cli \ php-common \ php-json \ php-xml \ php-ldap \ php-mbstring
sudo dnf install \ php \ php-cli \ php-common \ php-process \ php-json \ php-xml \ php-ldap \ php-mbstring
When installing a PHP version that is not the default of your system it
might be necessary to specify for which PHP version the packages are
php to for example
php8.1 in the packages to get
the packages for PHP 8.1. It might also be necessary to change the PHP
version Apache2 uses with the
Production php.ini settings#
Please configure the HRM machine for production. Edit the
php.ini configuration file
The corresponding file is
/etc/php.ini but at least as of RHEL 8 all
default settings are fine, so there shouldn’t be anything to change.
In there set at least the values below (more information can be found in the
php.ini file itself).
display_errors = Off display_startup_errors = Off error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
A relational database#
The HRM officially supports two relational databases: MySQL and PostgreSQL.
sudo apt install php-mysql mysql-server
sudo dnf install php-mysqlnd php-pdo mariadb-server sudo systemctl enable mariadb
It is recommended to install a database management tool like
sudo apt install php-pgsql postgresql
sudo dnf 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.
HRM needs access to several operations that are blocked by SElinux.
By default SElinux is disabled. In case SElinux has been enabled
/etc/selinux/config and update the following variable.
By default SElinux is enabled. Edit file
update the following variable.
Restart the machine after changing the value of SElinux.
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 install postfix
sudo dnf 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
.. code-block:: sh sudo apt install zip
sudo dnf install zip