Difference between revisions of "Installing EPrints 3 on OS X"

From EPrints Documentation
Jump to: navigation, search
(Added out of date warning)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
These instructions have been written based on experiences of installing EPrints 3.1.3 on Mac OS X 10.6 Snow Leopard. The chances are that these steps will also work for Mac OS X 10.5 Leopard.
+
{{Out_of_Date|These instructions have not been updated since 2009 and are still considered a work in progress. It is unlikely they will work for the latest versions of Mac OS X.}}
  
=Initial Setup=
+
http://www.eprints.org/documentation/handbook/osx.php
  
==Downloading EPrints==
+
Notes:
EPrints can be downloaded from the [http://files.eprints.org/view/type/release.html releases page]. Extract it in your downloads directory or wherever you downloaded it to.
 
  
==Setting Up The EPrints User and Group==
+
* Apache 2 should be installed from source along with mod_perl 2. The PerlHeaderParserHandler change is no longer necessary
Snow Leopard has now completely got rid of ''niutil'' and we now have to use ''dscl'' to setup the eprints user and group.
+
* All packages are now available as native OS X apps, so fink is not required.
  
Run the following commands to create the eprints user;
 
  
<pre>
+
'''N.B.''' This document is currently a work in progress - you should be able to get by with the installation instructions above for the time being.
dscl . -create /Users/eprints
 
dscl . -create /Users/eprints UserShell /bin/bash
 
dscl . -create /Users/eprints RealName "EPrints User"
 
dscl . -create /Users/eprints NFSHomeDirectory /opt/eprints3
 
dscl . -create /Users/eprints UniqueID 400
 
dscl . -append /Groups/staff GroupMembership eprints
 
</pre>
 
  
By setting the user id below 400 this means that OS X will not display the eprints user in any of the user control menus. For the NFSHomeDirectory setting make sure you set this value to wherever you wish to install eprints.
+
==Creating a user and group for EPrints==
  
Next run the following commands to create the eprints group and and the eprints user to it;
+
'''Note:''' This document assumes that you have used the same username, group name and home directory as listed in this section. If you choose to use different values (not recommended) then you will need to remember to use those at the appropriate places.
  
<pre>
+
==Downloading EPrints==
dscl . -create /Groups/eprints
 
dscl . -create /Groups/eprints RealName "EPrints Group"
 
dscl . -create /Groups/eprints gid 400
 
dscl . -create /Groups/eprints GroupMembership eprints
 
</pre>
 
 
 
Again setting the group id below 400 will not display the eprints group in any of the group control menus.
 
 
 
==Installing EPrints Prerequisites==
 
 
 
Rather then dealing with all of the details of compiling from source you can use a package manager such as [[http://www.macports.org/ MacPorts]] or [[http://finkproject.org Fink]]. Other than  for installing LaTeX this guide assumes that you are using with MacPorts or Fink. You can skip this stage if these dependencies are already installed.
 
 
 
===MySQL===
 
A package for installing MySQL is available from [[http://dev.mysql.com/downloads/]]. The current stable version of MySQL is 5.1.
 
 
 
===LaTeX===
 
To install ''latex'' and ''dvips'' on OS X you can install [[http://www.tug.org/mactex MacTeX]]. This is a fairly easy install as it is done using a standard OS X package install which handles all of the configuration details for you.
 
 
 
===pdftotext===
 
This is not available on MacPorts or Fink but you can download it from [[http://www.bluem.net/en/mac/others]]. Like MacTeX it is another package installer.
 
 
 
===Antiword===
 
MacPorts:
 
<pre>
 
sudo port install antiword
 
</pre>
 
 
 
Fink:
 
<pre>
 
sudo fink install antiword
 
</pre>
 
 
 
===Elinks===
 
MacPorts:
 
<pre>
 
sudo port install elinks
 
</pre>
 
 
 
Fink:
 
<pre>
 
sudo fink install elinks
 
</pre>
 
 
 
===wget===
 
MacPorts:
 
<pre>
 
sudo port install wget
 
</pre>
 
 
 
Fink:
 
<pre>
 
sudo fink install wget
 
</pre>
 
 
 
===DBD::mysql===
 
This Perl module is available from CPAN. CPAN is available in Snow Leopard by default. You can install it by running;
 
<pre>
 
sudo cpan DBD::mysql
 
</pre>
 
 
 
If you get any prompts about setting up CPAN accepting the defaults should work.
 
 
 
===Unicode::String===
 
This Perl module is available from CPAN. CPAN is available in Snow Leopard by default. You can install it by running;
 
<pre>
 
sudo cpan DBD::String
 
</pre>
 
 
 
If you get any prompts about setting up CPAN accepting the defaults should work.
 
 
 
=EPrints Setup=
 
 
 
==Installing EPrints==
 
You should now have all of the dependencies fulfilled to install EPrints. The first thing to do is go to your downloaded and extracted EPrints source folder and run;
 
 
 
<pre>
 
./configure
 
</pre>
 
 
 
If you need to change any settings then you can run;
 
  
<pre>
+
EPrints can be downloaded from the [http://files.eprints.org/view/type/release.html releases page]. You should choose the latest stable version, i.e. nothing marked with 'alpha', 'beta', 'release candidate' or 'RC', and download this to the home directory of the eprints user (/opt/eprints3).
./configure --help
 
</pre>
 
  
Once you have done this you should run;
+
==Prerequisites==
  
<pre>
+
'''Important:''' All applications and Perl modules should be installed as the root user.
sudo ./install.pl
 
</pre>
 
  
Once that has completed you should now have EPrints installed at ''/opt/eprints3'' or wherever you set as the installation path if you specified something different with the configure script.
+
===Applications===
  
==Create an EPrints Repository==
+
General application prerequisites for EPrints include:
Now that everything is installed you need to set up your EPrints archive. First thing is to switch to the eprints user and switch to the eprints directory;
+
* Apache Web Server 2 (preferably 2.2.x)
 +
* MySQL (preferably 5.0 or later - it is possible (but not recommended) to use MySQL 4)
 +
* PHP (preferably 5.0 or later)
 +
* mod_perl 2
 +
You can either install these packages individually from source or using a package management utility such as fink (highly recommended), or you can install a software package which includes all of these applications, such as [http://www.apachefriends.org/en/xampp.html xampp].
  
<pre>
+
You will also need the following applications installed in order to install EPrints:
sudo su eprints
 
cd
 
</pre>
 
  
Now run;
+
* expat
 +
* imagemagick
 +
* tetex
 +
* tar
 +
* unzip
 +
* wget
  
<pre>
+
All of these applications are now available as native OS X applications, and may already be installed on your system. However, you may find it easier to install them using fink.
bin/epadmin create
 
</pre>
 
  
You just need to follow the standard setup process. Make sure that your repository is set up to respond to ''localhost'' or an appropriate url. If you are working on a development machine and have multiple virtual hosts then you could use a custom url such as ''macprints.local'' but you need to make sure you add it to your ''/etc/hosts'' file.
+
====Installing via fink (optional)====
  
==Setup Apache==
+
If you do not already have fink installed, you should download it from the [http://www.finkproject.org Fink project website]. Once fink is installed, you need to ensure that you are running the latest version using the following command:
Apache is installed for you by default with Snow Leopard and you just need to complete a few pieces of configuration to get things working.
+
fink selfupdate-rsync
 +
'''N.B.''' The fink documentation will often tell you to simply use 'fink selfupdate', however this may not always work (especially if you are updating from an older version of fink on 10.4).
  
First make sure that mod_perl is enabled, just add the following line to ''/etc/apache2/httpd.conf'';
+
Once fink is installed and updated you can install all of the EPrints dependencies using the following commands:
 +
fink install exoat
 +
fink install imagemagick
 +
fink install tetex
 +
fink install tar
 +
fink install unzip
 +
fink install wget
  
<pre>
+
===Perl modules===
LoadModule perl_module libexec/apache2/mod_perl.so
 
</pre>
 
  
Next in ''/etc/apache2/other'' create a file called ''perl.conf'' and put the following inside it;
+
There are a number of Perl modules which require installation before EPrints can be compiled. Some setup work is required beforehand, which can be accomplished by running the following commands:
 +
cd /usr/include
 +
h2ph */*
 +
export EXPATLIBPATH=/sw/lib/
 +
export EXPATINCPATH=/sw/include/
 +
export PATH=$PATH:/usr/local/bin/
  
<pre>
+
Once these commands have been executed, change to the directory where you extracted eprints and run the following command:
<IfModule perl_module>
+
perl perlmodules.pl
  AddHandler cgi-script .pl
+
This should download and install all of the required Perl modules and their dependencies. You may be prompted to configure CPAN at this stage if you have not already done so.
  <IfModule dir_module>
 
    DirectoryIndex index.pl index.html
 
  </IfModule>
 
</IfModule>
 
</pre>
 
  
Finally in ''/etc/apache2/extra/httpd-vhosts.conf'' just add the EPrints Apache configuration before your first VirtualHost definition.
+
==Credits==
  
Once you have made these changes, restart apache and everything should be up and running.
+
This document is based on the original [http://www.eprints.org/documentation/handbook/osx.php Mac OS X installation guide], with updates for new versions of software, removal of instructions which are no longer necessary, and more detail on common problems which you may run into when installing EPrints on OS X.
  
 
[[Category:Installation]]
 
[[Category:Installation]]

Latest revision as of 11:20, 6 September 2017

Warning.png

Out of Date
The page has not been updated recently and is most likely out of date.

These instructions have not been updated since 2009 and are still considered a work in progress. It is unlikely they will work for the latest versions of Mac OS X.

http://www.eprints.org/documentation/handbook/osx.php

Notes:

  • Apache 2 should be installed from source along with mod_perl 2. The PerlHeaderParserHandler change is no longer necessary
  • All packages are now available as native OS X apps, so fink is not required.


N.B. This document is currently a work in progress - you should be able to get by with the installation instructions above for the time being.

Creating a user and group for EPrints

Note: This document assumes that you have used the same username, group name and home directory as listed in this section. If you choose to use different values (not recommended) then you will need to remember to use those at the appropriate places.

Downloading EPrints

EPrints can be downloaded from the releases page. You should choose the latest stable version, i.e. nothing marked with 'alpha', 'beta', 'release candidate' or 'RC', and download this to the home directory of the eprints user (/opt/eprints3).

Prerequisites

Important: All applications and Perl modules should be installed as the root user.

Applications

General application prerequisites for EPrints include:

  • Apache Web Server 2 (preferably 2.2.x)
  • MySQL (preferably 5.0 or later - it is possible (but not recommended) to use MySQL 4)
  • PHP (preferably 5.0 or later)
  • mod_perl 2

You can either install these packages individually from source or using a package management utility such as fink (highly recommended), or you can install a software package which includes all of these applications, such as xampp.

You will also need the following applications installed in order to install EPrints:

  • expat
  • imagemagick
  • tetex
  • tar
  • unzip
  • wget

All of these applications are now available as native OS X applications, and may already be installed on your system. However, you may find it easier to install them using fink.

Installing via fink (optional)

If you do not already have fink installed, you should download it from the Fink project website. Once fink is installed, you need to ensure that you are running the latest version using the following command:

fink selfupdate-rsync

N.B. The fink documentation will often tell you to simply use 'fink selfupdate', however this may not always work (especially if you are updating from an older version of fink on 10.4).

Once fink is installed and updated you can install all of the EPrints dependencies using the following commands:

fink install exoat
fink install imagemagick
fink install tetex
fink install tar
fink install unzip
fink install wget

Perl modules

There are a number of Perl modules which require installation before EPrints can be compiled. Some setup work is required beforehand, which can be accomplished by running the following commands:

cd /usr/include
h2ph */*
export EXPATLIBPATH=/sw/lib/
export EXPATINCPATH=/sw/include/
export PATH=$PATH:/usr/local/bin/

Once these commands have been executed, change to the directory where you extracted eprints and run the following command:

perl perlmodules.pl

This should download and install all of the required Perl modules and their dependencies. You may be prompted to configure CPAN at this stage if you have not already done so.

Credits

This document is based on the original Mac OS X installation guide, with updates for new versions of software, removal of instructions which are no longer necessary, and more detail on common problems which you may run into when installing EPrints on OS X.