Installing on Mac OS X 10.8 and later
Last tested on (possibly with earlier CollectionSpace release):
February 2013 with OS X 10.8.2.
Installing Prerequisites
Make sure you are a logged in as a user with Administrative rights and sudo privileges.
Installing Xcode
Updating Mac OS X
Select Software Update...
from the Apple menu. Among other things, this will guide you through:
- Updating Mac OS X to version 10.8.2, or to whatever may be the latest version of Mac OS X 10.8 ("Mountain Lion") as of this writing.
- Applying the latest Apple security updates to your operating system.
Performing a Software Update will also help ensure that you will have updated copies of certain other CollectionSpace installation prerequisites, such as the Ant and Maven build tools.
Installing Java
To install Java 7:
- Visit Oracle's Java SE download page
- Click any of the
Java Platform (JDK) 7u... Download
buttons on that page. - Click the
Accept License Agreement
button. - Follow the next steps described in Oracle's guide, How do I install Java for my Mac?:
- One minor but important change from that guide: you'll be downloading a file whose name begins with
jdk
, rather thanjre
as described in the guide.
(As of this writing, the file you will want to download is namedjdk-7u13-macosx-x64.dmg
: the Java Development Kit (JDK) for Java 7 Update 13.)
- One minor but important change from that guide: you'll be downloading a file whose name begins with
Installing ImageMagick
ImageMagick is a graphics package required by the CollectionSpace system for displaying and manipulating images.
Linux users have the benefit of using built-in package managers - tools that install software packages - to install many of the necessary prerequisites for installing CollectionSpace.
Mac OS X does not come with a built-in package manager. Instead, the following steps will first install Homebrew, an easy and lightweight package manager, as a means to install ImageMagick.
Run the Homebrew install script:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
For more information on installing Homebrew, see the "Install Homebrew" section of the Homebrew home page.
Next, install Git, a fast version control system used by Homebrew, to initiate the installation of ImageMagick:
brew install git
Next, install a package that includes a shared library required by ImageMagick:
brew install libtool --universal
Finally, install ImageMagick:
brew install imagemagick
If you plan to upload TIFF images to your CollectionSpace system, you may need to instead:
brew install libtiff brew install imagemagick --with-libtiff
If for any reason your ImageMagick installation via Homebrew fails, try:
- Diagnosing Homebrew issues by entering
brew doctor
inside your Homebrew Library directory (e.g. inside/usr/local/Library
on some systems), and resolving any issues found by following the instructions provided. - Using a third-party ImageMagick installer from Cactuslab. This installation includes TIFF support.
Installing the PostgreSQL database server
REQUIRED: Although the next steps are in a separate page, they are mandatory for the install to work.
Follow the instructions for installing and setting up the PostgreSQL server on this page. After installing and setting up the PostgreSQL server, return to this page and complete the remaining CollectionSpace-related installation steps below.
Installing CollectionSpace
Getting CollectionSpace
Go to the directory where you want to install CollectionSpace:
cd /usr/local/share
Download the tarball:
wget https://s3-us-west-2.amazonaws.com/cs-public-shared-files/releases/5.1/cspace-server-5.1.tar.gz
Unpack tarball:
tar zxvof {multi-excerpt-include:pageTitle=VERSION INCLUSIONS|name=TARBALL-NAME|nopanel=true}
This will create an apache-tomcat-7.0.57 directory.
Your account will need to have write permission to the newly-created apache-tomcat-7.0.57 directory and all of its subdirectories. You can test this by trying to touch
or edit a file in that directory tree (but make sure you are not currently su or sudo).
If you do not have write permissions, you can chown -R the entire directory tree to your user; e.g. sudo chown -R myusername:mygroup apache-tomcat-6.0.33
Optionally remove the tarball:
rm cspace-server-5.1.tar.gz
Make necessary files executable:
chmod u+x apache-tomcat-7.0.57/bin/*.sh
Setting up CollectionSpace
You need an administrative user in PostgreSQL that CollectionSpace can use: one that has been granted full privileges and can grant privileges to other users. Either set up a new user account (recommended), or you can use the postgres
user that you set up in the prerequisites section of this page. The values myusername
and mypassword
, below, should be replaced by the actual username and password of this user.
Set up environment variables. Make sure that the following values correspond to your environment:
Tip
The names of three environment variables changed between CollectionSpace versions 4.0 and 4.1. In addition, one new environment variable was added, and one old variable was deleted. These changes are reflected in the instructions below. See Updating environment variables when migrating to CollectionSpace 4.1 or higher for details.
CSPACE_JEESERVER_HOME: The full path to the apache-tomcat-7.0.57 directory that was created when you unpacked the CollectionSpace tarball.
CATALINA_HOME: The full path to the apache-tomcat-7.0.57 directory, identical to the value of CSPACE_JEESERVER_HOME.
CATALINA_PID: The full path to a file which will hold the Tomcat server process number. This is used by the Tomcat shutdown script.
CATALINA_OPTS: Environment options for the Tomcat server process. The recommended options below are Java Virtual Machine (JVM) memory settings which permit allocation of up to 1 GB of RAM to the Java heap and up to 384 MB of RAM for Java Permanent Generation (PermGen) space.
JAVA_HOME: The full path to your Java directory. Apple recommends that you set this to the output of running the command /usr/libexec/java_home
, and by entering that command surrounded with backticks (`), as shown below, you can do that automatically.
DB_CSADMIN_PASSWORD: The password for the administrative database user for the CollectionSpace application. This must match the password for that user that you specified while setting up PostgreSQL, via the instructions in PostgreSQL Installation under Linux. (This administrative user by default will be named csadmin
, and will be a superuser. However, this user will have fewer privileges than the overall database administrator superuser, by default named postgres
.)
DB_NUXEO_PASSWORD: Any database-legal password of your choice for the nuxeo
database user. This user can work with CollectionSpace data stored in Nuxeo, the content management system underlying CollectionSpace.
DB_CSPACE_PASSWORD: Any database-legal password of your choice for the cspace
database user. This user can work with CollectionSpace data for users, roles, and access permission.
DB_READER_PASSWORD: Any database-legal password of your choice for the reader
database user. This user will have read-only access to CollectionSpace data stored in Nuxeo.
ANT_OPTS: Environment options for the Apache Ant build tool. The recommended options below are Java Virtual Machine (JVM) memory settings which permit allocation of up to 768 MB of RAM to the Java heap and up to 512 MB of RAM for Java Permanent Generation (PermGen) space.
MAVEN_OPTS: Environment options for the Maven build tool. The recommended options below are Java Virtual Machine (JVM) memory settings which permit allocation of up to 768 MB of RAM to the Java heap and up to 512 MB of RAM for Java Permanent Generation (PermGen) space.
The example below is for the Bash shell; edit ~/.bashrc
or ~/.bash_profile
and be sure to substitute the actual values for your environment:
export CSPACE_JEESERVER_HOME="/usr/local/share/apache-tomcat-7.0.57" export CATALINA_HOME=$CSPACE_JEESERVER_HOME export CATALINA_PID="$CSPACE_JEESERVER_HOME/bin/tomcat.pid" export CATALINA_OPTS="-Xmx1024m -XX:MaxPermSize=384m" \# Note that the JAVA_HOME declaration below uses backticks (`), rather than double quote marks: export JAVA_HOME=`/usr/libexec/java_home` export DB_CSADMIN_PASSWORD="your_csadmin_database_user_password_here" export DB_NUXEO_PASSWORD="your_nuxeo_database_user_password_here" export DB_CSPACE_PASSWORD="your_cspace_database_user_password_here" export DB_READER_PASSWORD="your_reader_database_user_password_here" export ANT_OPTS="-Xmx768m -XX:MaxPermSize=512m" export MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=512m"
If you added these lines to ~/.bashrc
, to ensure these environment variables are present in every new login shell, edit or create the ~/.bash_profile
file and add the following line to that file:
. ~/.bashrc
Next, the path for PostgreSQL's binaries need to be added to the shell PATH environment.
Mac OS X sets the PATH environmental variable not in ~/.bashrc
as would be the case in other Linux based OS's but in /etc/paths
.
/etc/paths
is read-only so you'll need the sudo
command to save any edits :
sudo vi /etc/paths
Note: vi
is a sample file editor found in Mac OS X but others, like pico
or emacs
can be used as well.
The PATH variable below should reflect the path for PostgreSQL's bin/ directory, which is defaulted to /Library/PostgreSQL/9.1/bin
. Change this to reflect your PostgreSQL installation path if you have a custom installation.
Add the following line to the top of the file:
/Library/PostgreSQL/9.1/bin
(If you've installed a version of PostgreSQL other than 9.1, change the version number in the path above accordingly.)
Opening a new Terminal.app window and typing env
will show a list of all environmental variables.