This section describes how to update a DSpace installation from one version to the next. Details of the differences between the functionality of each version are given in the Version History section.
The changes in 1.3.2 are only code changes so the update is simply a matter of rebuilding the wars.
In the notes below [dspace]
refers to the install directory for your existing DSpace installation, and [dspace-1.3.2-source]
to the source directory for DSpace 1.3.2. Whenever you see these path references, be sure to replace them with the actual path names on your local system.
Get the new DSpace 1.3.2 source code from the DSpace page on SourceForge and unpack it somewhere. Do not unpack it on top of your existing installation!!
Copy the PostgreSQL driver JAR to the source tree. For example:
cd [dspace]/lib cp postgresql.jar [dspace-1.3.2-source]/lib
Take down Tomcat (or whichever servlet container you're using).
Your 'localized' JSPs (those in jsp/local) now need to be maintained in the source directory. If you have locally modified JSPs in your [dspace]/jsp/local
directory, you will need to merge the changes in the new 1.3.2 versions into your locally modified ones. You can use the diff
command to compare the 1.3.1 and 1.3.2 versions to do this.
In [dspace-1.3.2-source]
run:
ant -Dconfig=[dspace]/config/dspace.cfg update
Copy the .war
Web application files in [dspace-1.3.2-source]/build
to the webapps
sub-directory of your servlet container (e.g. Tomcat). e.g.:
cp [dspace-1.3.2-source]/build/*.war [tomcat]/webapps
If you're using Tomcat, you need to delete the directories corresponding to the old .war
files. For example, if dspace.war
is installed in [tomcat]/webapps/dspace.war
, you should delete the [tomcat]/webapps/dspace
directory. Otherwise, Tomcat will continue to use the old code in that directory.
Restart Tomcat.
In the notes below [dspace]
refers to the install directory for your existing DSpace installation, and [dspace-1.3.x-source]
to the source directory for DSpace 1.3.x. Whenever you see these path references, be sure to replace them with the actual path names on your local system.
Step one is, of course, to back up all your data before proceeding!! Include all of the contents of [dspace]
and the PostgreSQL database in your backup.
Get the new DSpace 1.3.x source code from the DSpace page on SourceForge and unpack it somewhere. Do not unpack it on top of your existing installation!!
Copy the PostgreSQL driver JAR to the source tree. For example:
cd [dspace]/lib
cp postgresql.jar [dspace-1.2.2-source]/lib
Take down Tomcat (or whichever servlet container you're using).
Remove the old version of xerces.jar
from your installation, so it is not inadvertently later used:
rm [dspace]/lib/xerces.jar
Install the new config files by moving dstat.cfg
and dstat.map
from [dspace-1.3.x-source]/config/
to [dspace]/config
You need to add new parameters to your [dspace]/dspace.cfg
:
###### Statistical Report Configuration Settings ###### # should the stats be publicly available? should be set to false if you only # want administrators to access the stats, or you do not intend to generate # any report.public = false # directory where live reports are stored report.dir = /dspace/reports/
Build and install the updated DSpace 1.3.x code. Go to the [dspace-1.3.x-source]
directory, and run:
ant -Dconfig=[dspace]/config/dspace.cfg update
You'll need to make some changes to the database schema in your PostgreSQL database. [dspace-1.3.x-source]/etc/database_schema_12-13.sql
contains the SQL commands to achieve this. If you've modified the schema locally, you may need to check over this and make alterations.
To apply the changes, go to the source directory, and run:
psql -f etc/database_schema_12-13.sql [DSpace database name] -h localhost
Customise the stat generating statistics as per the instructions in System Statistical Reports
Initialise the statistics using:
[dspace]/bin/stat-initial
[dspace]/bin/stat-general
[dspace]/bin/stat-report-initial
[dspace]/bin/stat-report-general
Rebuild the search indices:
[dspace]/bin/index-all
Copy the .war
Web application files in [dspace-1.3.x-source]/build
to the webapps
sub-directory of your servlet container (e.g. Tomcat). e.g.:
cp [dspace-1.3.x-source]/build/*.war [tomcat]/webapps
Restart Tomcat.
The changes in 1.2.2 are only code and config changes so the update should be fairly simple.
In the notes below [dspace]
refers to the install directory for your existing DSpace installation, and [dspace-1.2.2-source]
to the source directory for DSpace 1.2.2. Whenever you see these path references, be sure to replace them with the actual path names on your local system.
Get the new DSpace 1.2.2 source code from the DSpace page on SourceForge and unpack it somewhere. Do not unpack it on top of your existing installation!!
Copy the PostgreSQL driver JAR to the source tree. For example:
cd [dspace]/lib cp postgresql.jar [dspace-1.2.2-source]/lib
Take down Tomcat (or whichever servlet container you're using).
Your 'localized' JSPs (those in jsp/local) now need to be maintained in the source directory. If you have locally modified JSPs in your [dspace]/jsp/local
directory, you might like to merge the changes in the new 1.2.2 versions into your locally modified ones. You can use the diff
command to compare the 1.2.1 and 1.2.2 versions to do this. Also see the version history for a list of modified JSPs.
You need to add a new parameter to your [dspace]/dspace.cfg
for configurable fulltext indexing
##### Fulltext Indexing settings ##### # Maximum number of terms indexed for a single field in Lucene. # Default is 10,000 words - often not enough for full-text indexing. # If you change this, you'll need to re-index for the change # to take effect on previously added items. # -1 = unlimited (Integer.MAX_VALUE) search.maxfieldlength = 10000
In [dspace-1.2.2-source]
run:
ant -Dconfig=[dspace]/config/dspace.cfg update
Copy the .war
Web application files in [dspace-1.2.2-source]/build
to the webapps
sub-directory of your servlet container (e.g. Tomcat). e.g.:
cp [dspace-1.2.2-source]/build/*.war [tomcat]/webapps
If you're using Tomcat, you need to delete the directories corresponding to the old .war
files. For example, if dspace.war
is installed in [tomcat]/webapps/dspace.war
, you should delete the [tomcat]/webapps/dspace
directory. Otherwise, Tomcat will continue to use the old code in that directory.
To finialise the install of the new configurable submission forms you need to copy the file [dspace-1.2.2-source]/config/input-forms.xml
into [dspace]/config
.
Restart Tomcat.
The changes in 1.2.1 are only code changes so the update should be fairly simple.
In the notes below [dspace]
refers to the install directory for your existing DSpace installation, and [dspace-1.2.1-source]
to the source directory for DSpace 1.2.1. Whenever you see these path references, be sure to replace them with the actual path names on your local system.
Get the new DSpace 1.2.1 source code from the DSpace page on SourceForge and unpack it somewhere. Do not unpack it on top of your existing installation!!
Copy the PostgreSQL driver JAR to the source tree. For example:
cd [dspace]/lib cp postgresql.jar [dspace-1.2.1-source]/lib
Take down Tomcat (or whichever servlet container you're using).
Your 'localized' JSPs (those in jsp/local) now need to be maintained in the source directory. If you have locally modified JSPs in your [dspace]/jsp/local
directory, you might like to merge the changes in the new 1.2.1 versions into your locally modified ones. You can use the diff
command to compare the 1.2 and 1.2.1 versions to do this. Also see the version history for a list of modified JSPs.
You need to add a few new parameters to your [dspace]/dspace.cfg
for browse/search and item thumbnails display, and for configurable DC metadata fields to be indexed.
# whether to display thumbnails on browse and search results pages (1.2+) webui.browse.thumbnail.show = false # max dimensions of the browse/search thumbs. Must be <= thumbnail.maxwidth # and thumbnail.maxheight. Only need to be set if required to be smaller than # dimension of thumbnails generated by mediafilter (1.2+) #webui.browse.thumbnail.maxheight = 80 #webui.browse.thumbnail.maxwidth = 80 # whether to display the thumb against each bitstream (1.2+) webui.item.thumbnail.show = true # where should clicking on a thumbnail from browse/search take the user # Only values currently supported are "item" and "bitstream" #webui.browse.thumbnail.linkbehaviour = item ##### Fields to Index for Search ##### # DC metadata elements.qualifiers to be indexed for search # format: - search.index.[number] = [search field]:element.qualifier # - * used as wildcard ### changing these will change your search results, ### ### but will NOT automatically change your search displays ### search.index.1 = author:contributor.* search.index.2 = author:creator.* search.index.3 = title:title.* search.index.4 = keyword:subject.* search.index.5 = abstract:description.abstract search.index.6 = author:description.statementofresponsibility search.index.7 = series:relation.ispartofseries search.index.8 = abstract:description.tableofcontents search.index.9 = mime:format.mimetype search.index.10 = sponsor:description.sponsorship search.index.11 = id:identifier.*
In [dspace-1.2.1-source]
run:
ant -Dconfig=[dspace]/config/dspace.cfg update
Copy the .war
Web application files in [dspace-1.2.1-source]/build
to the webapps
sub-directory of your servlet container (e.g. Tomcat). e.g.:
cp [dspace-1.2.1-source]/build/*.war [tomcat]/webapps
If you're using Tomcat, you need to delete the directories corresponding to the old .war
files. For example, if dspace.war
is installed in [tomcat]/webapps/dspace.war
, you should delete the [tomcat]/webapps/dspace
directory. Otherwise, Tomcat will continue to use the old code in that directory.
Restart Tomcat.
The process for upgrading to 1.2 from either 1.1 or 1.1.1 is the same. If you are running DSpace 1.0 or 1.0.1, you need to follow the instructions for upgrading from 1.0.1 to 1.1 to before following these instructions.
Note also that if you've substantially modified DSpace, these instructions apply to an unmodified 1.1.1 DSpace instance, and you'll need to adapt the process to any modifications you've made.
This document refers to the install directory for your existing DSpace installation as [dspace]
, and to the source directory for
DSpace 1.2 as [dspace-1.2-source]
. Whenever you see these path references below, be sure to replace them with the actual path names on your local system.
Step one is, of course, to back up all your data before proceeding!! Include all of the contents of [dspace]
and the PostgreSQL database in your backup.
Get the new DSpace 1.2 source code from the DSpace page on SourceForge and unpack it somewhere. Do not unpack it on top of your existing installation!!
Copy the required Java libraries that we couldn't include in the bundle to the source tree. For example:
cd [dspace]/lib cp activation.jar servlet.jar mail.jar [dspace-1.2-source]/lib
Stop Tomcat (or other servlet container.)
It's a good idea to upgrade all of the various third-party tools that DSpace uses to their latest versions:
Java (note that now version 1.4.0 or later is required)
Tomcat (Any version after 4.0 will work; symbolic links are no longer an issue)
PostgreSQL (don't forget to build/download an updated JDBC driver .jar file! Also, back up the database first.)
Ant
You need to add the following new parameters to your [dspace]/dspace.cfg
:
##### Media Filter settings ##### # maximum width and height of generated thumbnails thumbnail.maxwidth 80 thumbnail.maxheight 80
There are one or two other, optional extra parameters (for controlling the pool of database connections). See the version history for details. If you leave them out, defaults will be used.
Also, to avoid future confusion, you might like to remove the following property, which is no longer required:
config.template.oai-web.xml = [dspace]/oai/WEB-INF/web.xml
The layout of the installation directory (i.e. the structure of the contents of [dspace]
) has changed somewhat since 1.1.1. First up, your 'localized' JSPs (those in jsp/local) now need to be maintained in the source directory. So make a copy of them now!
Once you've done that, you can remove [dspace]/jsp
and [dspace]/oai
, these are no longer used. (.war Web application archive files are used instead).
Also, if you're using the same version of Tomcat as before, you need to remove the lines from Tomcat's conf/server.xml file that enable symbolic links for DSpace. These are the <Context>
elements you added to get DSpace 1.1.1 working, looking something like this:
<Context path="/dspace" docBase="dspace" debug="0" reloadable="true" crossContext="true"> <Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true" /> </Context>
Be sure to remove the <Context> elements for both the Web UI and the OAI Web applications.
Build and install the updated DSpace 1.2 code. Go to the DSpace 1.2 source directory, and run:
ant -Dconfig=[dspace]/config/dspace.cfg update
Copy the new config files in config
to your installation, e.g.:
cp [dspace-1.2-source]/config/news-* [dspace-1.2-source]/config/mediafilter.cfg [dspace-1.2-source]/config/dc2mods.cfg [dspace]/config
You'll need to make some changes to the database schema in your PostgreSQL database. [dspace-1.2-source]/etc/database_schema_11-12.sql
contains the SQL commands to achieve this. If you've modified the schema locally, you may need to check over this and make alterations.
To apply the changes, go to the source directory, and run:
psql -f etc/database_schema_11-12.sql [DSpace database name] -h localhost
A tool supplied with the DSpace 1.2 codebase will then update the actual data in the relational database. Run it using:
[dspace]/bin/dsrun org.dspace.administer.Upgrade11To12
Then rebuild the search indices:
[dspace]/bin/index-all
Delete the existing symlinks from your servlet container's (e.g. Tomcat's) webapp
sub-directory.
Copy the .war
Web application files in [dspace-1.2-source]/build
to the webapps
sub-directory of your servlet container (e.g. Tomcat). e.g.:
cp [dspace-1.2-source]/build/*.war [tomcat]/webapps
Restart Tomcat.
To get image thumbnails generated and full-text extracted for indexing automatically, you need to set up a 'cron' job, for example one like this:
# Run the media filter at 02:00 every day 0 2 * * * [dspace]/bin/filter-media
You might also wish to run it now to generate thumbnails and index full text for the content already in your system.
Note 1: This update process has effectively 'touched' all of your items. Although the dates in the Dublin Core metadata won't have changed (accession date and so forth), the 'last modified' date in the database for each will have been changed.
This means the e-mail subscription tool may be confused, thinking that all items in the archive have been deposited that day, and could thus send a rather long email to lots of subscribers. So, it is recommended that you turn off the e-mail subscription feature for the next day, by commenting out the relevant line in DSpace's cron job, and then re-activating it the next day.
Say you performed the update on 08-June-2004 (UTC), and your e-mail subscription cron job runs at 4am (UTC). When the subscription tool runs at 4am on 09-June-2004, it will find that everything in the system has a modification date in 08-June-2004, and accordingly send out huge emails. So, immediately after the update, you would edit DSpace's 'crontab' and comment out the /dspace/bin/subs-daily
line. Then, after 4am on 09-June-2004 you'd 'un-comment' it out, so that things proceed normally.
Of course this means, any real new deposits on 08-June-2004 won't get e-mailed, however if you're updating the system it's likely to be down for some time so this shouldn't be a big problem.
Note 2: After consulation with the OAI community, various OAI-PMH changes have occurred:
The OAI-PMH identifiers have changed (they're now of the form oai:hostname:handle
as opposed to just Handles)
The set structure has changed, due to the new sub-communities feature.
The default base URL has changed
As noted in note 1, every item has been 'touched' and will need re-harvesting.
The above means that, if already registered and harvested, you will need to re-register your repository, effectively as a 'new' OAI-PMH data provider. You should also consider posting an announcement to the OAI implementers e-mail list so that harvesters know to update their systems.
Also note that your site may, over the next few days, take quite a big hit from OAI-PMH harvesters. The resumption token support should alleviate this a little, but you might want to temporarily whack up the database connection pool parameters in [dspace]/config/dspace.cfg
. See the dspace.cfg
distributed with the source code to see what these parameters are and how to use them. (You need to stop and restart Tomcat after changing them.)
I realize this is not ideal; for discussion as to the reasons behind this please see relevant posts to the OAI community: post one, post two, as well as this post to the dspace-tech mailing list.
If you really can't live with updating the base URL like this, you can fairly easily have thing proceed more-or-less as they are, by doing the following:
Change the value of OAI_ID_PREFIX
at the top of the org.dspace.app.oai.DSpaceOAICatalog
class to hdl:
Change the servlet mapping for the OAIHandler
servlet back to /
(from /request
)
Rebuild and deploy dspace-oai.war
However, note that in this case, all the records will be re-harvested by harvesters anyway, so you still need to brace for the associated DB activity; also note that the set spec changes may not be picked up by some harvesters. It's recommended you read the above-linked mailing list posts to understand why the change was made.
Now, you should be finished!
Fortunately the changes in 1.1.1 are only code changes so the update is fairly simple.
In the notes below [dspace]
refers to the install directory for your existing DSpace installation,
and [dspace-1.1.1-source]
to the source directory for DSpace 1.1.1. Whenever you see these path
references, be sure to replace them with the actual path names on your local system.
Take down Tomcat.
It would be a good idea to update any of the third-party tools used by DSpace at this point (e.g. PostgreSQL), following the instructions provided with the relevant tools.
In [dspace-1.1.1-source]
run:
ant -Dconfig=[dspace]/config/dspace.cfg update
If you have locally modified JSPs of the following JSPs in your [dspace]/jsp/local
directory, you might like to merge the changes in the new 1.1.1 versions into your locally modified ones. You can use the diff
command to compare the 1.1 and 1.1.1 versions to do this. The changes are quite minor.
collection-home.jsp admin/authorize-collection-edit.jsp admin/authorize-community-edit.jsp admin/authorize-item-edit.jsp admin/eperson-edit.jsp
Restart Tomcat.
To upgrade from DSpace 1.0.1 to 1.1, follow the steps below. Your dspace.cfg
does not need to be changed.
In the notes below [dspace]
refers to the install directory for your existing DSpace installation,
and [dspace-1.1-source]
to the source directory for DSpace 1.1. Whenever you see these path
references, be sure to replace them with the actual path names on your local system.
Take down Tomcat (or whichever servlet container you're using).
We recommend that you upgrage to the latest version of PostgreSQL (7.3.2). Included are some notes to help you do this. Note you will also have to upgrade Ant to version 1.5 if you do this.
Make the necessary changes to the DSpace database. These include a couple of minor schema changes, and some new indices which should improve performance. Also, the names of a couple of database views have been changed since the old names were so long they were causing problems. First run psql
to access your database (e.g. psql -U dspace -W
and then enter the password), and enter these SQL commands:
ALTER TABLE bitstream ADD store_number INTEGER; UPDATE bitstream SET store_number = 0; ALTER TABLE item ADD last_modified TIMESTAMP; CREATE INDEX last_modified_idx ON Item(last_modified); CREATE INDEX eperson_email_idx ON EPerson(email); CREATE INDEX item2bundle_item_idx on Item2Bundle(item_id); REATE INDEX bundle2bitstream_bundle_idx ON Bundle2Bitstream(bundle_id); CREATE INDEX dcvalue_item_idx on DCValue(item_id); CREATE INDEX collection2item_collection_idx ON Collection2Item(collection_id); CREATE INDEX resourcepolicy_type_id_idx ON ResourcePolicy (resource_type_id,resource_id); CREATE INDEX epersongroup2eperson_group_idx on EPersonGroup2EPerson(eperson_group_id); CREATE INDEX handle_handle_idx ON Handle(handle); CREATE INDEX sort_author_idx on ItemsByAuthor(sort_author); CREATE INDEX sort_title_idx on ItemsByTitle(sort_title); CREATE INDEX date_issued_idx on ItemsByDate(date_issued); DROP VIEW CollectionItemsByDateAccessioned; DROP VIEW CommunityItemsByDateAccessioned; CREATE VIEW CommunityItemsByDateAccession as SELECT Community2Item.community_id, ItemsByDateAccessioned.* FROM ItemsByDateAccessioned, Community2Item WHERE ItemsByDateAccessioned.item_id = Community2Item.item_id; CREATE VIEW CollectionItemsByDateAccession AS SELECT collection2item.collection_id, itemsbydateaccessioned.items_by_date_accessioned_id, itemsbydateaccessioned.item_id, itemsbydateaccessioned.date_accessioned FROM itemsbydateaccessioned, collection2item WHERE (itemsbydateaccessioned.item_id = collection2item.item_id);
Fix your JSPs for Unicode. If you've modified the site 'skin' (jsp/local/layout/header-default.jsp
) you'll need to add the Unicode header, i.e.:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
to the <HEAD> element. If you have any locally-edited JSPs, you need to add this page directive to the top of all of them:
<%@ page contentType="text/html;charset=UTF-8" %>
(If you haven't modified any JSPs, you don't have to do anything.)
Copy the required Java libraries that we couldn't include in the bundle to the source tree. For example:
cd [dspace]/lib cp *.policy activation.jar servlet.jar mail.jar [dspace-1.1-source]/lib
Compile up the new DSpace code, replacing [dspace]/config/dspace.cfg
with the path to your current, LIVE configuration. (The second line, touch `find .`
, is a precaution, which ensures that the new code has a current datestamp and will overwrite the old code. Note that those are back quotes.)
cd [dspace-1.1-source] touch `find .` ant ant -Dconfig=[dspace]/config/dspace.cfg update
Update the database tables using the upgrader tool, which sets up the new >last_modified
date in the item table:
Run [dspace]/bin/dsrun org.dspace.administer.Upgrade101To11
Run the collection default authorisation policy tool:
[dspace]/bin/dsrun org.dspace.authorize.FixDefaultPolicies
Fix the OAICat properties file. Edit [dspace]/config/templates/oaicat.properties
. Change the line that says
Identify.deletedRecord=yes
To:
Identify.deletedRecord=persistent
This is needed to fix the OAI-PMH 'Identity' verb response. Then run [dspace]/bin/install-configs
.
Re-run the indexing to index abstracts and fill out the renamed database views:
[dspace]/bin/index-all
Restart Tomcat. Tomcat should be run with the following environment variable set, to ensure that Unicode is handled properly. Also, the default JVM memory heap sizes are rather small. Adjust -Xmx512M
(512Mb maximum heap size) and -Xms64M
(64Mb Java thread stack size) to suit your hardware.
JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"