Updated Guide Available
This tutorial is an aid to doing the bits of the standard install in a mac-specific way. I'll try to keep the headings/numbering the same so you can follow.
See [ Installing DSpace on OSX] for an older, more terse version.
I gather that DSpace can be difficult to install sometimes - these guidelines made it a breeze for me.
1. OSX: Install the latest XCode tools from Apple. If you have Tiger or later then the ones that came on your install disc are probably fine.
2. Java: xCode tools should have updated this. make sure you have done all your system updates. Check Java with
3. Apache Ant: xCode should have done this too.
4. PostgreSQL 8.0+
I like OSX Postgres installer found at http://www.entropy.ch/software/macosx/postgresql/ as it puts PostgreSQL in /usr/local thus saving me from the game of 'hunt the os specific path' that can make your life hell. This way everything is where you expect it to be (especially if you are looking postgresql documentation that assumes unix/linux)
There are a number of OSX installers/builds. Use the one you like best.
Note: you can also install PostgreSQL using MacPorts (or you can read here [http://www.mac-how.net/ Mac How] )
Note: these instructions assume postgresql in /usr/local other installers may not do the same. multiple installs of postgresql with associated startup items etc can be a headache. Start with a clean machine if you can.
Create a new user in the Users System Prefs pane:
(there is no good reason to create a shell only user - a standard osx user is fine - and easier to manage)
DSpace doesn't care which which osx user - it works via tcp.
Open a terminal window and type in the following commands:
enter administrator password when asked
(enter the password of the newly created postgres user when asked)
and wait for the operation to complete
Read the responses as they will tell you if things go badly. The homepage for the installer includes some links for troubleshooting.
I have recently had an instance when it was refusing to start because of the log file - but this was resolved by specifying the full path to the log file; -l /usr/local/pgsql/postgres.log
PS Shut down the DB server with;
Once you have started postgresql...
Edit /usr/local/pgsql/data/postgresql.conf uncomment the line starting:
Then restart PostgreSQL with
wait for it...
5. Apache Tomcat 5.5
DSpace will need to run as the same user as Tomcat, *so install and run Tomcat as a user called 'dspace' *.
(Do this as dspace after step 1. Create the DSpace user. below. Sorry.
. Then, to make things easier in the future when upgrading tomcat and to make things easier in general you should create a simlink called tomcat to the full name of the tomcat folder with
Here is what you need to change to /etc/profile under osx for tomcat/dspace
change PATH to include /usr/local/bin
NOTE To edit /etc/profile - do the following
don't be scared: use your arrow keys to move arround and use the apple-c apple-v keys to copy and paste
when you are finished use ctrl-x ctrl-s to save followed immediately by c-x c-c to quit
do the same
to add the unicode support for tomcat (i.e. URIEncoding="UTF-8")
(the <Connector bit is a fair way down)
1. Create the DSpace user. This needs to be the same user that Tomcat will run. (do the same as you did for postgresql - but with the postgres user above/)
this is a good time to use 'fast user switching' to change to the dspace os x user.
2. Download the latest DSpace source code release and unpack it:
I'd download it to /Users/dspace/
will create a folder /Users/dspace/dspace-source-1.4.1
I like to move it and create a symlink
But thats just me.
3. Download the PostgreSQL JDBC driver from the postgresql site to
I rename it to postgresql.jar Do you need to?
Remember to get version 8.2 of PostgreSQL for JDBC2.
Move the JDBC driver to the DSpace source tree
4. Create a dspace database, owned by the dspace PostgreSQL user:
Enter a password for the DSpace database.
5. Edit dspace-source/config/dspace.cfg, in particular you'll need to set these properties:
6. Create the directory for the DSpace installation. As root, run:
7. As the dspace OS X user, compile and install DSpace:
8. Copy the DSpace Web application archives (.war files) to the appropriate directory in your Tomcat/Jetty/Resin installation. For example:
9. Create an initial administrator account:
10. reStart Tomcat.
Visit the base URL of your server, e.g. http://localhost:8080/dspace