DSpace Installation

This article is from the DSpace Official Documentation.Hope you also Like It…….


This method gets you up and running with DSpace quickly and easily. It is identical in both the Default Release and

Source Release distributions.

1. Create the DSpace user. This needs to be the same user that Tomcat (or Jetty etc) will run as. e.g. as root run:

useradd -m dspace

2. Download the latest DSpace release [http://sourceforge.net/projects/dspace/] and unpack it. Although there are two

available releases (dspace-1.x-release.zip and dspace-1.x-src-release.zip), you only need to

choose one. If you want a copy of all underlying Java source code, you should download the dspace-1.x-srcrelease.

zip release.

unzip dspace-1.x-release.zip

For ease of reference, we will refer to the location of this unzipped version of the DSpace release as [dspacesource]

in the remainder of these instructions.

3. Database Setup


a. A PostgreSQL 8.1-404 jdbc3 driver is configure as part of the default DSpace build. You no longer need to

copy any postgres jars to get postgres installed.

b. Create a dspace database, owned by the dspace PostgreSQL user:

createuser -U postgres -d -A -P dspace

createdb -U dspace -E UNICODE dspace

Enter a password for the DSpace database. (This isn’t the same as the dspace user’s UNIX password.)


a. Setting up oracle is a bit different now. You will need still need to get a Copy of the oracle JDBC driver, but

instead of copying it into a lib directory you will need to install it into your local Maven repository. You’ll need

to download it first from this location: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/


$ mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=com.oracle –

DartifactId=ojdbc14 -Dversion= -Dpackaging=jar -DgeneratePom=true

b. Create a database for DSpace. Make sure that the character set is one of the Unicode character sets. DSpace uses

UTF-8 natively, and it is suggested that the Oracle database use the same character set. Create a user account

for DSpace (e.g. dspace,) and ensure that it has permissions to add and remove tables in the database.

c. Edit the [dspace-source]/dspace/config/dspace.cfg database settings:

db.name = oracle

db.url = jdbc.oracle.thin:@//host:port/dspace

db.driver = oracle.jdbc.OracleDriver

d. Go to [dspace-source]/dspace/etc/oracle and copy the contents to their parent directory,

overwriting the versions in the parent:

cd [dspace-source]/dspace/etc/oracle

cp * ..

You now have Oracle-specific .sql files in your etc directory, and your dspace.cfg is modified to point to

your Oracle database.

4. Edit [dspace-source]/dspace/config/dspace.cfg, in particular you’ll need to set these properties:

dspace.dir — must be set to the [dspace] (installation) directory.

dspace.url — complete URL of this server’s DSpace home page.

dspace.hostname — fully-qualified domain name of web server.

dspace.name — “Proper” name of your server, e.g. “My Digital Library”.

db.password — the database password you entered in the previous step.

mail.server — fully-qualified domain name of your outgoing mail server.

mail.from.address — the “From:” address to put on email sent by DSpace.

feedback.recipient — mailbox for feedback mail.

mail.admin — mailbox for DSpace site administrator.

alert.recipient — mailbox for server errors/alerts (not essential but very useful!)

registration.notify — mailbox for emails when new users register (optional)

NOTE: You can interpolate the value of one configuration variable in the value of another one. For example, to

set feedback.recipient to the same value as mail.admin, the line would look like:

feedback.recipient = ${mail.admin}

See the dspace.cfg file for examples.

5. Create the directory for the DSpace installation (i.e. [dspace]). As root (or a user with appropriate permissions),


mkdir [dspace]

chown dspace [dspace]

(Assuming the dspace UNIX username.)

6. As the dspace UNIX user, generate the DSpace installation package in the [dspace-source]/dspace/

target/dspace-[version].dir/ directory:

cd [dspace-source]/dspace/

mvn package

Note: without any extra arguments, the DSpace installation package is initialized for PostgreSQL.

If you want to use Oracle instead, you should build the DSpace installation package as follows:

mvn -Ddb.name=oracle package

7. As the dspace UNIX user, initialize the DSpace database and install DSpace to [dspace]:



ant fresh_install

Note: to see a complete list of build targets, run ant help

The most likely thing to go wrong here is the database connection. See the common problems section.

8. Tell your Tomcat/Jetty/Resin installation where to find your DSpace web application(s). As an example, in the

<Host> section of your [tomcat]/conf/server.xml you could add lines similar to the following (but replace [dspace] with your installation location):

<!– DEFINE A CONTEXT PATH FOR DSpace JSP User Interface –>

<Context path=”/jspui” docBase=”[dspace]webappsjspui” debug=”0″

reloadable=”true” cachingAllowed=”false”


<!– DEFINE A CONTEXT PATH FOR DSpace OAI User Interface –>

<Context path=”/oai” docBase=”[dspace]webappsoai” debug=”0″

reloadable=”true” cachingAllowed=”false”


Alternatively, you could copy only the DSpace Web application(s) you wish to use from [dspace]/webapps to the appropriate directory in your Tomcat/Jetty/Resin installation. For example:

cp -r [dspace]/webapps/jspui


cp -r [dspace]/webapps/oai


9. Create an initial administrator account:


10.Now the moment of truth! Start up (or restart) Tomcat/Jetty/Resin. Visit the base URL(s) of your server, depending on which DSpace web applications you want to use. You should see the DSpace home page. Congratulations!

Base URLs of DSpace Web Applications:

JSP User Interface – (e.g.) http://dspace.myu.edu:8080/jspui

XML User Interface (aka. Manakin) – (e.g.) http://dspace.myu.edu:8080/xmlui

OAI-PMH Interface – (e.g.) http://dspace.myu.edu:8080/oai/request?verb=identify (Should return an XML-based response)

In order to set up some communities and collections, you’ll need to login as your DSpace Administrator (which you created with create-administrator above) and access the administration UI in either the JSP or XML user interface.