Wednesday, April 08, 2009

DSpace 1.5.2 installation procedure on CentOS 5.3

I have just complete a clean install of DSpace 1.5.2 on a CentOS 5.3 box.

Here is the installation process I followed:

Login as the root user and download dspace to /root:
lynx http://sourceforge.net/project/showfiles.php?group_id=19984%20%20

Create an account for the dspace user:
useradd dspace
passwd dspace

I have already installed the JDK on this server during the LAMS install. For details please select this link

Download and install maven and ant:
cd /root
lynx http://maven.apache.org/download.html
mkdir /usr/local/apache-maven
mv apache-maven-2.1.0-bin.tar.gz /usr/local/apache-maven/
cd /usr/local/apache-maven
tar -xzvf apache-maven-2.1.0-bin.tar.gz
cd /usr/local
lynx http://ant.apache.org/bindownload.cgi
mv /root/apache-ant-1.7.1-bin.tar.gz .
tar -xzvf apache-ant-1.7.1-bin.tar.gz

Add paths to /etc/profile:
nano /etc/profile

Add the following:
M2_HOME=/usr/local/apache-maven/apache-maven-2.1.0
export M2_HOME
MAVEN_OPTS="-Xms256m -Xmx512m"
export MAVEN_OPTS
M2=$M2_HOME/bin
export M2
PATH=${PATH}:${M2}
ANT_HOME=/usr/local/apache-ant-1.7.1
export ANT_HOME
PATH=${PATH}:${ANT_HOME}/bin
export PATH

Logout and log back in again so that the environment variables from /etc/profile are applied.

Check that maven and ant are installed:

mvn --version
Apache Maven 2.1.0 (r755702; 2009-03-18 19:10:27+0000)
Java version: 1.6.0_13
Java home: /usr/java/jdk1.6.0_13/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.18-92.1.22.el5xen" arch: "i386" Family: "unix"

ant -version
Apache Ant version 1.7.1 compiled on June 27 2008

Install the postgresql database and configure postgresql:

yum install postgresql postgresql-server
chkconfig --level 2345 postgresql on
service postgresql start

nano /var/lib/pgsql/data/postgresql.conf
For 8.0+, in
postgresql.conf uncomment the line starting:
listen_addresses = 'localhost'
#---------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#---------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all

nano /var/lib/pgsql/data/pg_hba.conf

Then don't tighten up security a bit by editing
pg_hba.conf as the default file is already too restrictive to allow creation of the dspace database. Just enter the following contents into the actual configuration section of the file and delete everything else from this section.

# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust

Check the databases already present:
su - postgres
-bash-3.2$ psql -l
List of databases
Name | Owner | Encoding
-----------+----------+----------
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8
(3 rows)


Create the user and database:
-bash-3.2$ createuser -U postgres -d -A -P dspace
Enter password for new role: XXXX
Enter it again: XXXX
Shall the new role be allowed to create more new roles? (y/n) n
CREATE ROLE
-bash-3.2$ createdb -U dspace -E UNICODE dspace
CREATE DATABASE

-bash-3.2$ psql -l
List of databases
Name | Owner | Encoding
-----------+----------+----------
dspace | dspace | UTF8
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8


service postgresql stop
Stopping postgresql service: [ OK ]
service postgresql start
Starting postgresql service: [ OK ]

nmap 127.0.0.1
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-10 08:47 BST
Interesting ports on localhost.localdomain (127.0.0.1):
Not shown: 1667 closed ports
PORT STATE SERVICE
25/tcp open smtp
80/tcp open http
443/tcp open https
631/tcp open ipp
3306/tcp open mysql
4444/tcp open krb524
5432/tcp open postgres
5801/tcp open vnc-http-1
5901/tcp open vnc-1
6001/tcp open X11:1
8009/tcp open ajp13
8080/tcp open http-proxy
9090/tcp open zeus-admin
Nmap finished: 1 IP address (1 host up) scanned in 0.120 seconds


As the root user, download and install Tomcat:

cd /root
lynx http://tomcat.apache.org/download-60.cgi
cp apache-tomcat-6.0.18.tar.gz /home/dspace
cd /home/dspace
chown dspace:dspace apache-tomcat-6.0.18.tar.gz
su - dspace
tar -xzvf apache-tomcat-6.0.18.tar.gz
exit

nano /etc/profile
and append the following lines:

JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"
export JAVA_OPTS

Here I tell DSpace/Tomcat to listen on port 8081 and AJP connector port 8010 (I have to do this as JBoss Tomcat used with LAMS is already listening on 8080 and 8009):

su - dspace
rm -rf apache-tomcat-6.0.18.tar.gz
cd apache-tomcat-6.0.18/conf
nano server.xml
In server.xl change any references to port 8080 to port 8081 and any references for port 8009 to port 8010.

cd /home/dspace/apache-tomcat-6.0.18/bin
./startup.sh
Using CATALINA_BASE: /home/dspace/apache-tomcat-6.0.18
Using CATALINA_HOME: /home/dspace/apache-tomcat-6.0.18
Using CATALINA_TMPDIR: /home/dspace/apache-tomcat-6.0.18/temp
Using JRE_HOME: /usr/java/jdk1.6.0_13


Just to confirm that DSpace/Tomcat is listening on port 8081:

nmap 127.0.0.1
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-11 17:08 BST
Interesting ports on localhost.localdomain (127.0.0.1):
Not shown: 1666 closed ports
PORT STATE SERVICE
25/tcp open smtp
80/tcp open http
443/tcp open https
631/tcp open ipp
3306/tcp open mysql
4444/tcp open krb524
5432/tcp open postgres
5801/tcp open vnc-http-1
5901/tcp open vnc-1
6001/tcp open X11:1
8009/tcp open ajp13
8080/tcp open http-proxy
8081/tcp open blackice-icecap
9090/tcp open zeus-admin


./shutdown.sh
Using CATALINA_BASE: /home/dspace/apache-tomcat-6.0.18
Using CATALINA_HOME: /home/dspace/apache-tomcat-6.0.18
Using CATALINA_TMPDIR: /home/dspace/apache-tomcat-6.0.18/temp
Using JRE_HOME: /usr/java/jdk1.6.0_13


Now install DSpace:

su - root
cd /root
cp dspace-1.5.2-release.tar.gz /home/dspace
cd /home/dspace
chown dspace:dspace dspace-1.5.2-release.tar.gz
exit

tar -xzvf dspace-1.5.2-release.tar.gz
cd dspace-1.5.2-release/dspace/config
nano dspace.cfg

The configuration settings shown below in dspace.cfg are just the settings I either changed or uncommented in the default file:

dspace.dir = /home/dspace
dspace.url = http://vleinternal.bromley.ac.uk/jspui
dspace.hostname = vleinternal.bromley.ac.uk
dspace.name = DSpace for eLearning Evaluation at Bromley College
db.name = postgres
db.url = jdbc:postgresql://localhost:5432/dspace
db.driver = org.postgresql.Driver
db.username = dspace
db.password = XXXX
mail.server=vleinternal.bromley.ac.uk
mail.from.address = dspace-noreply@vleinternal.bromley.ac.uk
feedback.recipient = dspace-help@vleinternal.bromley.ac.uk
mail.admin = dspace-help@vleinternal.bromley.ac.uk
default.language = en_GB

cd..
mvn package
A lot of information now appears on the screen. Below are shown the last lines confirming success:
[INFO] Copying 861 files to /home/dspace/dspace-1.5.2-release/dspace/target/dspace-1.5.2-build.dir
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] DSpace Addon Modules .................................. SUCCESS [30.453s]
[INFO] DSpace XML-UI (Manakin) :: Web Application ............ SUCCESS [1:14.611s]
[INFO] DSpace LNI :: Web Application ......................... SUCCESS [10.261s]
[INFO] DSpace OAI :: Web Application ......................... SUCCESS [6.427s]
[INFO] DSpace JSP-UI :: Web Application ...................... SUCCESS [8.017s]
[INFO] DSpace SWORD :: Web Application ....................... SUCCESS [5.869s]
[INFO] DSpace Assembly and Configuration ..................... SUCCESS [43.018s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 59 seconds
[INFO] Finished at: Sun Apr 12 07:40:07 BST 2009
[INFO] Final Memory: 25M/255M
[INFO] ------------------------------------------------------------------------


exit

Now to set up postgresql to allow access to the dspace database:
nano /var/lib/pgsql/data/pg_hba.conf
Add the following line to end of the file:

host dspace dspace 127.0.0.1 255.255.255.255 md5

service postgresql restart

su - dspace
cd /home/dspace/dspace-1.5.2-release/dspace/target/dspace-1.5.2-build.dir
ant fresh_install
A lot of information now appears on the screen. Below are shown the last lines confirming success:
[echo] ====================================================================
[echo] The DSpace code has been installed, and the database initialized.
[echo]
[echo] To complete installation, you should do the following:
[echo]
[echo] * Setup your Web servlet container (e.g. Tomcat) to look for your
[echo] DSpace web applications in: /home/dspace/webapps/
[echo]
[echo] OR, copy any web applications from /home/dspace/webapps/ to
[echo] the appropriate place for your servlet container.
[echo] (e.g. '$CATALINA_HOME/webapps' for Tomcat)
[echo]
[echo] * Make an initial administrator account (an e-person) in DSpace:
[echo]
[echo] /home/dspace/bin/create-administrator
[echo]
[echo] * Start up your servlet container (Tomcat etc.)
[echo]
[echo] You should then be able to access your DSpace's 'home page':
[echo]
[echo] http://vleinternal.bromley.ac.uk/dspace
[echo]
[echo] You should also be able to access the administrator UI:
[echo]
[echo] http://vleinternal.bromley.ac.uk/dspace/dspace-admin
[echo] ====================================================================
[echo]
BUILD SUCCESSFUL


cd /home/dspace/apache-tomcat-6.0.18/conf
nano server.xml and add the following to the end of the host section:
Note that the standard html opening and closing tag braces have been replaced by {} in this blog purely for display purposes.

{!-- DEFINE A CONTEXT PATH FOR DSpace JSP User Interface --}
{Context path="/jspui" docBase="/home/dspace/webapps/jspui" debug="0"
reloadable="true" cachingAllowed="false"
allowLinking="true"/}
{!-- DEFINE A CONTEXT PATH FOR DSpace OAI User Interface --}
{Context path="/oai" docBase="/home/dspace/webapps/oai" debug="0"
reloadable="true" cachingAllowed="false"
allowLinking="true"/}

cd /home/dspace/bin
./create-administrator

/home/dspace/apache-tomcat-6.0.18/bin
./shutdown.sh
./startup.sh

Now visit http://127.0.0.1:8081/jspui from the browser and it works !!!!!!

Now set up the crontab for dspace:
crontab -e
no crontab for dspace - using an empty one

# Send out subscription e-mails at 01:00 every day
0 1 * * * /home/dspace/bin/sub-daily
# Run the media filter at 02:00 every day
0 2 * * * /home/dspace/bin/filter-media
# Run the checksum checker at 03:00
0 3 * * * /home/dspace/bin/checker -lp
# Mail the results to the sysadmin at 04:00
0 4 * * * /home/dspace/bin/dsrun org.dspace.checker.DailyReportEmailer -c
# Run stat analyses
0 1 * * * /home/dspace/bin/stat-general
0 1 * * * /home/dspace/bin/stat-monthly
0 2 * * * /home/dspace/bin/stat-report-general
0 2 * * * /home/dspace/bin/stat-report-monthly
20 4 * * * cd /home/dspace/vacuumdb && ( PGPASSWORD=`cat .pgpass` /usr/bin/vacuumdb --analyze -v -h 127.0.0.1 -U dspace dspace )

cd /home/dspace
mkdir vacuumdb
cd vacuumdb/
nano .pgpass
chmod 600 .pgpass
exit

Getting DSpace Tomcat to work behind Apache using mod_jk turned out to be relatively straightforward. LAMS was already working behind mod_jk. For more information on installing mod_jk please select this link.

cd /etc/httpd/conf
nano workers.properties
and add/amend the following lines:

# workers.tomcat_home=/usr/lib/apache-tomcat
# workers.java_home=/usr/lib/jdk
ps=/
worker.list=worker1,worker2
worker.worker1.port=8009
worker.worker2.port=8010
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1

cd /etc/httpd/conf.d
nano jk.conf
and add/amend the following lines:

#
# Mod_jk2 allows the Apache Web server to connect to application
# servers using the AJP protocol. This allows web applications to
# be integrated seamlessly into your Apache server's URI space and
# utilize Apache features such as SSL processing.
#
LoadModule jk_module modules/mod_jk.so
#
# mod_jk is configured in /etc/httpd/conf/workers.properties
#
# Where to find workers.properties
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk logs
JkLogFile /var/log/httpd/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Send servlet for context /lams to worker named worker1
JkMount /lams worker1
# Send JSPs for context /lams/* to worker named worker1
JkMount /lams/* worker1
#
JkMount /upload/* worker1
#
JkMount /jmx-console/* worker1
#
JkMount /jspui worker2
#
JkMount /jspui/* worker2
#
JkMount /oai worker2
#
JkMount /oai/* worker2

Restart apache and DSpace is now available on the URL http://vleinternal.bromley.ac.uk/jspui/

Now create a script to antomatically start and stop tomcat.

nano /etc/init.d/tomcat
#!/bin/sh
#
# description: Tomcat
#
# Shell script to to start/stop Tomcat
#
# Set Enviroment Variables and Paths
#
JAVA_HOME=JAVA_HOME=/usr/java/jdk1.6.0_13; export JAVA_HOME
CATALINA_HOME=/home/dspace/apache-tomcat-6.0.18/; export CATALINA_HOME
PATH=${PATH}:${JAVA_HOME}/jre/bin; export PATH
#
case "$1" in
start)
#
# Start Tomcat
#
echo
sudo -u dspace /home/dspace/apache-tomcat-6.0.18/bin/startup.sh
;;
stop)
#
# Stop Tomcat
#
sudo -u dspace /home/dspace/apache-tomcat-6.0.18/bin/shutdown.sh
;;
*)
echo "Usage service tomcat start/stop"
exit 1;;
esac

chmod 755 tomcat
service tomcat stop
service tomcat start

I found with CentOS 5 that Tomcat was failing to start on boot and I was getting the following error in the logs :

sudo: sorry, you must have a tty to run sudo

The solution turned out to be very simple. I used the visudo command to edit sudo's configuration file and juts commented out the line

Defaults requiretty


Getting LDAP access to Active Directory working

Now that DSpace is successfully running the next step is to configure LDAP access to Active Directory.

In order to help with this download and install the JAVA based lDAP browser, JXplorer This will help you test your connection with Active Directory and discover the additional settings you need to include in dspace.cfg

Open the GUI in Linux as a user and within a terminal window enter the following commands:

lynx http://www.jxplorer.org/
unzip JXv3.2rc2deploy.zip
cd Desktop
cd jxplorer/
chmod 755 jxplorer.sh
./jxplorer.sh

JXplorer will now open in a window on your desktop. Click on the "connect" icon and fill in the settings for Active Directory access. You will need to have a bind user already set up in AD, who has permissions to browse the AD tree. The format of the User DN that worked for me was bindusername@bromley.local, but this very much depends on your AD structure. I left the Base DN dialog box empty and was then able to browse and search the entire LDAP tree.

It can also be helpful to use the command line LDAP client ldapsearch to investigate connection options. This can be installed from a root login as follows:

cd /etc/openldap
nano ldap.conf

Add entries for BASE and HOST to the file.

It is then necessary to install openldap as follows:

yum install openldap
yum install openldap-clients

The command using the following syntax allowed me to search our AD structure:

ldapsearch -x -v -D "bindusername@bromley.local" -W -L "cn=Clive Gould"
ldap_initialize( )
Enter LDAP Password:


The LDAP Password required is the one for the binduser in AD and the results of the search were successfully displayed for the AD account Clive Gould.

Once you have used one, or both, of the above techniques to verify AD connection settings and structure DSpace can now be configured.

The configuration settings shown below in dspace.cfg are the settings I changed in the default file in order to get LDAP authentication working for us:

Please note that this was the version of dspace.cfg stored in the /home/dspace/config folder.

#### Stackable Authentication Methods #####

# Stack of authentication methods
# (See org.dspace.authenticate.AuthenticationManager)
# Example:
# plugin.sequence.org.dspace.authenticate.AuthenticationMethod = \
# org.dspace.authenticate.ShibAuthentication, \
# org.dspace.authenticate.PasswordAuthentication

# Next two lines added by Clive Gould on 22/04/09 to allow AD Authentication

plugin.sequence.org.dspace.authenticate.AuthenticationMethod = \
org.dspace.authenticate.LDAPHierarchicalAuthentication

#### LDAP Authentication Configuration Settings ####

ldap.enable = true
ldap.provider_url = ldap://10.100.0.2:3268/
ldap.id_field = sAMAccountName
ldap.object_context = dc=bromley,dc=local
ldap.search_context = dc=bromley,dc=local
ldap.email_field = mail
ldap.surname_field = sn
ldap.givenname_field = givenName
webui.ldap.autoregister = true
ldap.login.specialgroup = Authenticated
ldap.search_scope = 2
ldap.search.user = bindusername@bromley.local
ldap.search.password = YYYYYYYY

Where the ldap.search.password is the password for the binduser in AD. Please note that the syntax of the line containing the ldap.provider_url was critical to getting LDAP authentication working for me, especially the / after the port number!

It was then necessary to rebuild DSpace as follows:

cd dspace-1.5.2-release/dspace/
mvn package
cd /home/dspace/dspace-1.5.2-release/dspace/target/dspace-1.5.2-build.dir
ant -Dconfig=/home/dspace/config/dspace.cfg update

On restarting Tomcat as root I found I could then login to DSpace using my normal AD username and password. My user profile in DSpace was automatically completed by using my details from my AD account.

I found I could not login using my original DSpace administrator account as direct password-login was now disabled. I had to run the create-administrator script again to add my new "AD" indentity to the list of DSpace administrators.

Another problem, which was solved thanks to a reply to a DSpace tech-lists posting was to do with the ldap.login.specialgroup - When logged in as DSpace administrator and visiting the Groups option I expected to see users who logged on added automatically to the Authenticated group. Stuart Lewis and Flavio Botelho kindly replied to my posting and explained that this was a "special" group.

"This means that users are not added to it as such, but are transient members of it during the period that they are logged in. Therefore you will not see anyone listed in that group, however such users should inherit the permissions of belonging to that group." Stuart Lewis

I subsequently noticed that the feedabck form on the DSpace homepage was producing an internal error when a user tried to submit a message. This was because email was undeliverable to dspace-help and dspace-noreply. The solution from a root login was as follows:

nano /etc/aliases

append the following lines to the file:

dspace-help: clive@somewhere.com
dspace-noreply: clive@somewhere.com

and run the newaliases command:

newaliases
/etc/aliases: 79 aliases, longest 16 bytes, 842 bytes total


Differentiating between student and staff login to DSpace

In order to control access to collections we needed to be able to differentiate between authorised staff and student login.

Stuart Lewis very kindly provided a patch that allowed staff logging in to be automatically added to an all-staff special group and students logging in to be automatically added to an all-students special group.

As user dspace, download the src release of dspace 1.5.2 into /home/dspace and extract it.

lynx http://sourceforge.net/project/showfiles.php?group_id=19984%20%20
tar -xzvf dspace-1.5.2-src-release.tar.gz

Edit the file LDAPHierarchicalAuthentication.java, which controls special groups

nano /home/dspace/dspace-1.5.2-src-release/dspace-api/src/main/java/org/dspace/authenticate/LDAPHierarchicalAuthentication.java

Replace the existing section of the code with the following:

/*
* New code written by Stuart Lewis and added by Clive Gould on 28th April 2009
*/

public int[] getSpecialGroups(Context context, HttpServletRequest request)
{
try
{
if (!context.getCurrentUser().getNetid().equals(""))
{
Group staffGroup = Group.findByName(context, "all-staff");
Group studentsGroup = Group.findByName(context, "all-students");

// Does the username start with a '1'?
if ((studentsGroup != null) && context.getCurrentUser().getNetid().startsWith("1")))
{
// Add them to the students group
return new int[] { studentsGroup.getID() };
}
else if (staffGroup != null)
{
// Add them to the staff group
return new int[] { staffGroup.getID() };
}
}
}
catch (Exception npe) {
// The user is not an LDAP user, so we don't need to worry about them
}
return new int[0];
}

Build and install DSpace

cd /home/dspace/dspace-1.5.2-src-release/dspace
mvn package
cd /home/dspace/dspace-1.5.2-src-release/dspace/target/dspace-1.5.2-build.dir
ant -Dconfig=/home/dspace/config/dspace.cfg update

Restart tomcat and it works :)

su - root
service tomcat stop
service tomcat start


Customising the User Interface

In order to customise the appearance of DSpace 1.5.2 I modified the following files:

/home/dspace/dspace-1.5.2-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/styles.css.jsp

/home/dspace/dspace-1.5.2-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/layout/header-default.jsp

/home/dspace/dspace-1.5.2-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/layout/footer-default.jsp

/home/dspace/dspace-1.5.2-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/home.jsp

I also included the college logo by adding the logo.gif file in the following location:

/home/dspace/dspace-1.5.2-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/image/logo.gif

DSpace was then rebuilt and restarted as follows:

cd /home/dspace/dspace-1.5.2-src-release/dspace
mvn package
cd /home/dspace/dspace-1.5.2-src-release/dspace/target/dspace-1.5.2-build.dir
ant -Dconfig=/home/dspace/config/dspace.cfg update

su - root
service tomcat stop
service tomcat start


Customising the URL

We wanted to have DSpace available on the URL /dspace instead of /jspui and OAI access on /dspace-oai instead of /oai

Stuart Lewis from the University of Auckland kindly provided me with the solution :)

I logged in as user dspace.

First I had to modify tomcat's server.xml file:

nano /home/dspace/apache-tomcat-6.0.18/conf/server.xml

and change the context path as shown below:

from

Context path="/jspui" docBase="/home/dspace/webapps/jspui"

to

Context path="/dspace" docBase="/home/dspace/webapps/jspui"

and from

Context path="/oai" docBase="/home/dspace/webapps/oai" debug="0"

to

Context path="/dspace-oai" docBase="/home/dspace/webapps/oai" debug="0"


Also it was necessary to edit jk.conf:

nano /etc/httpd/conf.d/jk.conf

Then change the JkMount directives to point to the new path as shown below:

JkMount /dspace worker2
#
JkMount /dspace/* worker2
#
JkMount /dspace-oai worker2
#
JkMount /dspace-oai/* worker2


It was then necessary to change the path used by the dspace.url directive in dspace.cfg and rebuild DSpace.

On restarting tomcat DSpace and OAI were available using the required paths :)


Getting the handle server working

This eventually turned out to be relatively easy. It was necessary to edit dspace.cfg and include our existing CNRI handle prefix as follows:

# CNRI Handle prefix
handle.prefix = 2045

It was also necessary to tell DSpace to use the handle server version 6.2 and rebuild DSpace from source. The process I followed is given below. Note that xml tag brackets have been replaced by [] to avoid display problems in this blog.

As user dspace, edit /home/dspace/dspace-1.5.2-src-release/pom.xml and change the handle server version to 6.2. (Thanks go to Stuart Lewis of the The University of Auckland Library for the information on how tell maven to use version 6.2 of the handle jar :)

nano /home/dspace/dspace-1.5.2-src-release/pom.xml

[dependency]
[groupId]org.dspace[/groupId]
[artifactId]handle[/artifactId]

[version]6.2[/version]
[/dependency]

Rebuild DSpace completely from source

cd /home/dspace/dspace-1.5.2-src-release/dspace
mvn package
cd /home/dspace/dspace-1.5.2-src-release/dspace/target/dspace-1.5.2-build.dir
ant -Dconfig=/home/dspace/config/dspace.cfg update

Create the handle server configuration and start the server

cd /home/dspace/bin
./make-handle-config
./start-handle-server

The handle server was tested using the lynx text browser:

lynx vle.bromley.ac.uk:8000

Once the handle ports had been opened at firewall level all was well and handles correctly resolved with handle.net :)))

For more information on testing the handle server and setting up service level scripts to start and stop the server please see the original blog posting below.


Upgrading to DSpace 1.6.0

5th April 2010 : Please note that this is a work in progress and I will log the process once it is complete

Looking at all that is involved this upgrade is starting to look more like a summer holiday job!

Please watch this space...