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
Below you find notes taken during HRM test installations under OS X.
Apache
Enable PHP by uncommenting
LoadModule php and AddModule mod_php insudo 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:
- http://www.entropy.ch/software/macosx/php/
- http://discussions.apple.com/thread.jspa?threadID=749816&tstart=522
- After the upgrade you may need to
- Rename
/usr/bin/php'# to '#/usr/bin/php4:sudo mv /usr/bin/php /usr/bin/php4 - Symlink to the new php:
sudo ln -s /usr/local/php5/bin/php /usr/bin/php(paths may vary) - That's because the php command line interpreter is used by the HRM daemon run by
hrmd.plist(see below) and must also be version 5, so the alternative is editing that file to refer to the correct php5 binary.
- Rename
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
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 thehrmsubdirectory and its code it the machine doesn't have many users. The URL for such location is something likehttp://server.domain.top/~username/hrm. - The location to place html pages globally by the administrator is something like
/Library/WebServer/Documentsbut may vary in different installations.
mySQL
Installation instructions: http://dev.mysql.com/doc/mysql-macosx-excerpt/5.1/en/mac-os-x-installation.html
Other references: http://www.macdevcenter.com/pub/a/mac/2002/03/08/apache_mac_5.html?page=2
mySQL downloaded from http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg
Fix
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
Administration tools
phpMyAdmin (http://www.phpmyadmin.net/home_page/downloads.php
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.
