You are on page 1of 30

DSpace 3.

1 on Windows 7
Installation Guide

Prepared by: Sisay Webshet, Information systems specialist, ILRI (International Livestock research institute)
swebshet@cgiar.org

March 2013

Pre-requisite Software:
1.

OpenJDK 6 or 7. Java Development Kit: JDK is a development environment for building applications, applets, and components using the Java programming language. You can download it from http://java.sun.com/javase/downloads/index.jsp

2. PostgreSQL 8.3 to 8.4: is a powerful, open source object-relational database system. It has native Programming interfaces for CIC++, Java, .Net, Perl, Python, Ruby, Tcl, ODBC, among other you can download it from: http://www.postgresql.org/download/windows 3. Apache Tomcat 5.5 or later: Apache Tomcat is an open source software implementation of the Java Servlets. This will work and help us to make our own Web server. You can download it fromhttp://tomcat.apache.org/download-60.cgi

4. Apache Maven 2.2.x or higher. Maven is necessary in the first stage of the build process to assemble the installation package for your DSpace instance Apache Maven is a software project management and comprehension tool. You can get it from :http://maven.apache.org/download.html

5. Apache Ant 1.8 or later. Ant is a Java-based build tool. Apache Ant is still required for the second stage of the build process. Apache Ant from:http://ant.apache.org/bindownload.cgi 6. DSpace 3.1. You will get it at. http://sourceforge.net/projects/dspace/files

1. Installing Java
download the file from http://java.sun.com/javase/downloads/index.jsp Double Click the file jdk-6u39-windows-x64.exe and follow the instructions
to install java

Configure Java environment on Windows


After installing Java Development Kit on Windows, you may still need to do some configuration to get Java ready for compiling and executing Java programs. The following instruction will guide you through the process of setting up JDK for software development. JDK is typically installed under C:\Program Files directory. For Java 6 Update 39, its installation folder will be C:\Program Files\Java\jdk1.6.0_39. Perform the following steps to make Java tools accessible.
Setting up JAVA PATH

Right click Computer, click Properties, click advanced system setting, click advanced tab, click Environment Variables,

And select PATH from System Variables PATH for Java C:\Program Files\Java\jdk1.6.0_39\bin

Add the above PATH variables in the edit box as last item (With Semi-Colons after each PATH)

Setting up JAVA_HOME

Right click My Computer, click Properties, click Advanced, click Environment Variables, click New from User Variables for user and add the following and click OK Variable name: JAVA_HOME Variable value: Java C:\Program Files\Java\jdk1.6.0_39\bin

Checking the PATH and HOME variables or verify the availability of Java compiler Go to command prompt (Click Start, click Run, type cmd) and click Enter key

Type java version (see the version displayed) or type javac version to check the compiler

2. Installing Apache Ant & Apache Maven


Both Apache Ant and Maven are in binary distribution; there is no installer file in that. Extract the zip folders apache-ant-1.8.4-bin.zip & apache-maven-2.2.1- bin.zip to drive. C: /

Setting up PATH for Apache Ant, Apache Maven (System Variables)

Right click My Computer, click Properties, click advanced system setting, click Environment Variables, select PATH from System Variables, and click edit

PATH for Ant C:\apache-ant-1.8.4\bin PATH for Maven C:\apache-maven-2.2.1\bin

Add the above PATH variables in the edit box as last item (With Semi-Colons after each PATH) ; C:\apache-ant-1.8.4\bin;C:\apache-maven-2.2.1\bin

Setting up ANT_HOME (User Variables)


Right click My Computer, click Properties, click Advanced, click Environment Variables, and click New from User Variables for user and add the following and click OK Variable name: ANT_HOME Variable value: C:\apache-ant-1.8.4

3. Installing PostgreSQL
PostgreSQL 8.3 to 8.4 PostgreSQL can be downloaded from the following location: http://www.postgresql.org/ . It is highly recommended that you try to work with Postgres 8.4 or greater, however 8.3 should still work. Obtain the PostgreSQL One Click Installer for Windows. Save it to your desktop. Double click on the installer postgresql-8.4.15-1-windows.exe The first page is an introduction. Click Next to continue.

The default installation directory is usually a good choice. Click Next.

The default data directory is usually a good choice. Click Next.

Postgres runs under a special operating system user account for security reasons. This account is created on your machine when the installer runs

The password is setup during the initial installation of the database server, and may be changed at any point in the future using pgAdmin Enter the password of your choice into both password fields and then click Next

The default port number is expected. Click Next Click Next. PostgreSQL will now be installed. This takes a little while, so enjoy a nice hot cup of coffee while waiting for this to finish.

Typical doesn't need anything from Stack Builder, so the check box can be unchecked before clicking Finish. You can always start Stack Builder later if you want something from that. Of particular interest are things like the ODBC and JDBC drivers which can be used to allow other applications to access the data typical stores.

Creating a user and database Start pgAdminIII You can connect to the database with the pgAdmin tool (Start - Programs - PostgreSQL 8.4 - pgAdmin III)

Connect to the database by right clicking PostgreSQL 8.4 (localhost : 5432) and clicking Connect

Type Here Password of PostgreSQL Installation you provided earlier

Create Login role (dspace) and Provide password as dspace

Then open role privileges tab.Tick mark on icons named: Can create database objects, and
can create roles, can modify catalog etc.

Creating database Create a database named dspace whose owner is dspace

dspace Encoding must be selected as UTF 8

4. Installing Apache Tomcat


Run apache-tomcat-6.0.36.exe to install tomcat

Give your user name (admin) and password, that will give you access to monitor and control you tomcat server web interface.

you can start/restart it right click my computer, select manage, select services and application on the left menu double click service and select Apache Tomcat 6.0 Tomcat6,select start/restart

You can see the service at http://localhost:8080/

5. Installing dspace 3.1


download the dspace source from http://sourceforge.net/projects/dspace/ Unzip the file
Copy the source directory folder Create the directory for the dspace installation (e.g. C:\dspace) in to c drive

Update the Config file

Go to C: \ dspace-3.1-src-release\dspace\config\dspace.cfg Open dspace.cfg file in WordPad or Notepad c++ and you'll need to set these properties accordingly

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.

Generate the Dspace Installation Generate the DSpace installation package by running commandline (cmd) from your [dspacesource]/dspace/ directory: and execute the command mvn package Go to cmd and change the directory to C:\dspace-3.1-src-release\dsapce and run the command mvn package or install

You will see lot of packages been downloaded and generates DSpace installation package in your C:\dspace-3.1-src-release\dspace\target\dspace-3.1-build directory.

Initialize the dspace database and install dspace to the installation folder (e.g. C:\dspace) Run the command ant fresh install from your source directory i.e. C:\dspace-3.1-srcrelease\dspace\target\dspace-3.1-build

Screen shot after a successful Installation of Dspace Create an Administer Account Create an administrator account by running the command dspace create-administrator from your C:\dspace directory C:\dspace\bin\ dspace create-administrator Enter the required information(Email, First Name, last Name and password)

Above Screen shot after a successful Creating dspace administrator

Copy the Web application You need to copy directories of your dspace web applications (jspui, xmlui, oai) into your webservers folder which are located in C:/dspace/webapps folder. You must copy 3 folders jspui, xmlui and oai from this Dspace \ webapps and paste these folders in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps

Open your browser to either http://localhost:8080/jspui/ http://localhost:8080/xmlui/

You should see the dspace home page for either the JSPUI or XMLUI, respectively

A screenshot that shows JSPUI interface (ABOVE)

A screenshot that shows XMLUI or mirage interface

Thank you!