Thursday, April 07, 2011

DSpace 1.7.1 Upgrade Procedure

Upgrade DSpace to version 1.7.1

Note that this upgrade process involves building DSpace from source because we use a custom hierarchical authentication module at Bromley.

Login as user dspace and download the source code:

cd
lynx http://sourceforge.net/projects/dspace/files/DSpace%20Stable/1.7.1/

unpack the source and change to the src directory:
tar -xzvf dspace-1.7.1-src-release.tar.gz
cd dspace-1.7.1-src-release

Stop Tomcat and the handle server:

su - root
service tomcat stop
service handle stop (n/a with standbyvle test server)
exit

Apply the Bromley College customisations to the file LDAPHierarchicalAuthentication.java.

Replace the getSpecialGroups code with the customised version (this is specifically for our installation)

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

Copy over the stylesheets and the Bromley College logo from version 1.7.0:

cp /home/dspace/dspace-1.7.0-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/styles.css.jsp
/home/dspace/dspace-1.7.1-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/styles.css.jsp

cp /home/dspace/dspace-1.7.0-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/layout/header-default.jsp
/home/dspace/dspace-1.7.1-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/layout/header-default.jsp

cp /home/dspace/dspace-1.7.0-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/layout/footer-default.jsp
/home/dspace/dspace-1.7.1-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/layout/footer-default.jsp

cp /home/dspace/dspace-1.7.0-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/home.jsp
/home/dspace/dspace-1.7.1-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/home.jsp

cp /home/dspace/dspace-1.7.0-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/image/logo.gif
/home/dspace/dspace-1.7.1-src-release/dspace-jspui/dspace-jspui-webapp/src/main/webapp/image/logo.gif

cp /home/dspace/dspace-1.7.0-src-release/dspace/config/dspace.cfg
/home/dspace/dspace-1.7.1-src-release/dspace/config/dspace.cfg

cp /home/dspace/dspace-1.7.1-src-release/dspace/config/dspace.cfg
/home/dspace/config/dspace.cfg

Build DSpace (note can take up to 15 minutes):

cd
cd dspace-1.7.1-src-release/dspace
mvn -U clean package

Update DSpace:

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

Generate the browse and search indexes:

/home/dspace/bin/dspace index-init

As the root user, start Tomcat and the handle server. Restart Apache and it works :)

su - root
service tomcat stop
service tomcat start
service handle start
service httpd restart
exit

Just to make sure I viewed the source code of the DSpace homepage, where the metadata confirmed the new version number:

meta name="Generator" content="DSpace 1.7.1"