Installing HRM in Apple Mac OS X


This document gathers some tips to you may find helpful to install the Huygens Remote Manager on OS X. The general installation instructions can be found at the HRM project wiki(external link) and some extra general tips can be found at Hrm Installation in this wiki.

Below you find notes taken during HRM test installations under OS X.

Apache


Enable PHP by uncommenting LoadModule php and AddModule mod_php in
sudo vi /private/etc/apache2/httpd.conf

In some installation only LoadModule php5_module is there to be enabled. That file can be alternatively located in /private/etc/httpd/httpd.conf.

To upgrade to PHP 5 in 10.4:


The apache user usually is _www, if you need to change the owner of the hrm code or the images directory you can do it like in this example:

sudo chown -R _www hrm

These old instructions still basically apply, please follow them: http://www.macdevcenter.com/pub/a/mac/2001/12/07/apache.html(external link). The idea is that you have to enable web sharing in the System Preferences. You'd better start the server after enabling PHP so that it is loaded correctly.

HRM installation


HRM is basically php code that is interpreted by Apache to serve html documents as in a web page.

Web pages can be installed in a Mac globally or per-user. Apache is configured in Mac OS X to serve html documents from certain directories:

  • When web sharing is enabled in a Mac, users can put their web pages under the directory ~/Sites. Than can be a good place to unpack the hrm subdirectory and its code it the machine doesn't have many users. The URL for such location is something like http://server.domain.top/~username/hrm.
  • The location to place html pages globally by the administrator is something like /Library/WebServer/Documents but may vary in different installations.

mySQL


Installation instructions: http://dev.mysql.com/doc/mysql-macosx-excerpt/5.1/en/mac-os-x-installation.html(external link)

Other references: http://www.macdevcenter.com/pub/a/mac/2002/03/08/apache_mac_5.html?page=2(external link)

mySQL downloaded from http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg(external link).

Fix(external link) for "Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' macosx" problem:

cd /var
sudo mkdir mysql <== this assumes the directory is missing
cd mysql
sudo ln -s /private/tmp/mysql.sock mysql.sock

Create and populate the hrm database


Please see the standard installation instructions(external link).

Administration tools


phpMyAdmin (http://www.phpmyadmin.net/home_page/downloads.php(external link)) is a web interface to mySQL databases than can be of some use.

HRM daemon


The HRM code includes a file resources/hrmd.plist that should be used instead of hrmd to run the HRM Queue Manager on a Mac.

Updated instructions on how to install or restart it can be found in the comments at the first lines of that file, please follow them.

That file needs some minor adaptations before installing to refer to the appropriate locations of your HRM installation, the places that must be edited are clearly marked by comment lines.