Mac OS X Installation Guide
adapted from work by Mike Jewell, University of Southampton, UK
Required Software
- Mac OS X 10.3 (Panther)
This guide may work with 10.2, but it was written with 10.3 in mind.
- Fink (available at http://fink.sourceforge.net)
Fink provides access to a large selection of open source software that has been ported to the Mac.
- MySQL 4.0 (available at http://www.mysql.com) unless you are running Mac OS X Server which already has it installed
Both the source install and binary installs should work - but ensure you follow the instructions in the provided README file to ensure that the permissions are correct.
Setting up the EPrints user
To add the eprints user and group to your system, you should do the following:
- Run the NetInfo Manager program that is in Applications/Utilities.
- Ensure that you are allowed to alter the settings (click the lock at the bottom of the dialog).
- Check the uid's and gid's (user ids and group ids) of all the entries in the groups and users sections. You will need to identify a number which is currently UNUSED. In the examples below we have chosen 100.
- Select the 'groups' section and duplicate the 'mysql' group.
- Alter the 'gid' (group id) to the number you chose above, and change the name to eprints.
- Select the 'users' section and duplicate the 'mysql' user.
- Alter the home directory to '/opt/eprints2', the username to 'eprints', the shell_name to /bin/bash, and 'uid' and 'gid' to the same value that you set 'gid' to be earlier for the group.

Figure 1: Browsing Groups Section in Netman
Configuring Apache
Mac OS X comes with Apache installed, complete with mod_perl. However, you need to alter the configuration slightly:
- su to root and edit '/etc/httpd/httpd.conf'
- Uncomment the following lines:
- LoadModule perl_module libexec/httpd/libperl.so
- AddModule mod_perl.c
- Add the following line to the end:
PerlHeaderParserHandler "sub { tie *STDOUT, 'Apache' unless tied *STDOUT; }"
Installing Required Software
This can be done via fink by using the following lines:
- /sw/bin/fink install expat
- /sw/bin/fink install imagemagick
- /sw/bin/fink install tetex
- /sw/bin/fink install tar
- /sw/bin/fink install unzip
- /sw/bin/fink install wget
Installing Required Perl Modules
- First, su to root, cd into /usr/include and run 'h2ph */*'
- Next you will need to set up a few environment variables:
- export EXPATLIBPATH=/sw/lib/
- export EXPATINCPATH=/sw/include/
- export PATH=$PATH:/usr/local/bin/
- Now su to root, and run 'perl perlmodules.pl' from your EPrints package directory.
Note: Installing DBD::mysql
There are two bugs within this module which mean that it must be installed by hand:
- Download the package from CPAN and extract it.
- Open 'myld' in your favourite text editor, and alter (at approx line 12):
my $retval = system @ARGV;
tomy $retval = system "@ARGV";
- Next, execute 'perl Makefile.PL --libs="`/usr/local/mysql/bin/mysql_config --libs`" --cflags="`/usr/local/mysql/bin/mysql_config --cflags`"' (Note the backquotes)
- Finally, do 'make' and, as root, 'make install'
Final installation
You should now be able to carry out the EPrints install as per the documentation.
Note: Installing with MySQL 4.0
MySQL 4.0 requires an extra permission to allow the creation of temporary tables. Once you have installed EPrints and run the configure_archive script, you should run 'mysql' from a command line and then use the following (substituting 'xxxxx' with the name of your database, and 'yyyy' with the database user):
GRANT CREATE TEMPORARY TABLES ON xxxxx.* TO yyyy AT localhost
You can find the database and username by looking in the archive/zzz.xml file in your EPrints directory (where zzz is the name of the archive).





