Table of contents
To get an excellent overview of all possibilities with the HRM join the HRM Webinar on January 29th!
The Huygens Remote Manager (HRM) is an open-source, efficient, multi-user web-based interface to the Huygens Software for parallel batch deconvolutions.
Details about its source code, licensing, and installation can be found at http://huygens-rm.org/. Installation instructions can be found at the HRM project.
This article here is intended to expand those basic installation instructions, including feedback from experiences in different platforms.
Despite Scientific Volume Imaging (SVI) participating in the open-source HRM project HRM is not a product by SVI. You can edit this wiki article freely to include your installation experiences.
Please use the project page for bug reports and feature requests. For other issues, please contact the HRM developers at this email address: help at huygens dash rm dot org.
HRM needs a relational database working on the system. Because it uses the ADOdb Database Abstraction Library it can in principle work with many of the available databases with little modifications. Both Postgres and MySQL are tested and officially supported in HRM.
HRM also needs Apache and PHP. An easy way to have everything installed together by means of a LAMP package.XAMPP for Linux has been tested successfully (see details below). Several Linux distributions have straightforward installations including these packages.
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. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers. (php.net).
Details for Mac OS X
Please, be referred to Mac OS X for details on the HRM installation on Mac OS X.
Download XAMPP for Linux and follow the instructions. In this example we used
Installing this package sets the html directory (the directory where web pages should be saved for Apache to serve them) to something like
/opt/lampp/htdocs. Create a subdir
The php command line interpreter is in
/opt/lampp/bin/php. The HRM queue manager needs it to run as a daemon. Make a symbolic link if necessary, for HRM to find it easily:
ln -s /opt/lampp/bin/php /bin/php
Make sure it is php 5, run
See Huygens Installation. For Linux, download the suite and type something like:
rpm -ivh --force huygens-3.0.0p4.rpm
Get and install a License String for Huygens Core. It is easy to apply for test licenses.
Download the HRM sources from http://hrm.sourceforge.net/ and follow the installation instructions.
If MySQL, PHP and Apache were installed separately (ie. not via LAMP), launch the database by typing 'mysqld', in the LAMP case, make sure LAMP has been started (/opt/lampp/lamp start).
To grant local access to certain users and avoid the following error, see My Sql Local Access.
Warning: mysql_connect(): Access denied for user 'dbuser'@'localhost' (using password: YES)
in /var/www/html/adodb/drivers/adodb-mysql.inc.php on line 358
Cannot connect to database host.
Newer HRM versions assist you in creating the database automatically. See the general installation instructions.
To grant local access to certain users, see Postgre SQLlocal Access.
Notice that it is recommended to perform several maintenance tasks on a regular basis so that the PostgreSQL server runs properly. The database vacuuming can be run manually on the HRM database, although it can be easily set up on a crontab job to run periodically. The PostgreSQL configuration also allows for automatic database vacuuming.
A very handy tool for the management of MySQL databases is phpMyAdmin, for postgresQL databases phppgadmin.
Daemon and configuration
Copy resources/hrm.conf to /etc/hrm.conf and configure it properly.
What follows applies to Linux operating systems only, for Mac OS X see Hrm Installation In Mac Os.
Copy the hrm/bin/hrmd script to /bin/hrmd.
To start the queue manager automatically at boot, copy the hrmd script to /etc/init.d/hrmd as well, and make sure that symlinks are provided for the correct runlevel. In RPM based distrubutions (RedHat, Fedora, SuSE, etc.), chkconfig can install these symlinks in the correct runlevel directories:
chkconfig -a hrmd
If the chkconfig tool is not available you can include the hrmd in rc3.d (console login) and rc5.d (graphical login):
ln -s ../hrmd S12hrmd
ln -s ../hrmd K13hrmd
ln -s ../hrmd S12hrmd
ln -s ../hrmd K13hrmd
In Fedora /etc/init.d/ is called /etc/rc.d/init.d, but the symlink /etc/init.d -> /etc/rc.d/init.d usually exists.
In Ubuntu the normal mode is rc2 but modes 2-5 are normally equivalent.
See runlevel for details on the correct level for your Linux distribution.
Manually launching the queue manager is done by typing:
(This basically executes the following:
php -q /system/hrm/run/runHuygensRemoteManager.php)
Ubuntu and PostgresQL
The PHP5 version included in Ubuntu does not support pgsql functions by default. To use a PostgresQL database instead of a MySQL, install the pgsql module as follows:
sudo apt-get install php5-pgsql
Debugging the program
The code is basically split into two parts, the HRM code and the adoDB layer for the database. Problems may occur in the latter when establishing the connection to the database (due to a misconfiguration of the database, or PHP, or Apache). To retrieve feedback from that code, replace
var $debug = false;
var $debug = true;
in the file
Things to pay attention to:
- Configure the hrm_server_config.inc and hrm_client_config.inc files under hrm/inc correctly (right passwords and directories). Double check the paths that require a trailing slash (/) and those that don't (read the comments). Mind that 'destination' and 'source' directories are not absolute paths, these are just names to automatically create such subdirectories under each user directory.
- Do not overwrite or edit hrm_config.inc, that is not a configuration file for tuning.
- Check the permissions of the data directory, they must be accessible to read and write to apache (wwwrun, www-data or other usernames are possible for apache).
- Use the correct Huygens program. Edit the hrm database table 'server' to use
huscript, which is not compatible with HRM.
- install missing components (e.g. php5-pgsql as mentioned above)
- tweak the permissions for the database (for postgres, in pg_hba.conf as in Postgre SQLlocal Access, for MySQL see My Sql Local Access.)
- create a new 'hrm' user for the database (in postgres, user 'postgres' may be configured so it can't be used by apache, the permission file may say that it must be "sameuser") and give it a password "hrmpwd". (For instructions on all this, see e.g. postgres user administration).
- Give full permissions to this user to all tables in database hrm.
- Restart the postmaster:
sudo /etc/init.d/postgresql-8.2 restartin a recent Ubuntu.
- If there are plenty of PHP errors on screen, the level of error reporting can be edited the php.ini file (for example not to warn about DEPRECATED or E_STRICT code) and restarting apache.
- If there are two or more confirmation emails per finished job, there might be multiple running queue managers active. Find out by executing
ps -A -o pid,command|grep Huygens. Kill them manually before starting the hrm daemon again.