<commit_before><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
  <HEAD>
    <TITLE>DSpace System Documentation: Updating a DSpace Installation</TITLE>
    <LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
  </HEAD>
  <BODY>
    <H1>DSpace System Documentation: Updating a DSpace Installation</H1>

    <P><A HREF="index.html">Back to contents</A></P>

    <P>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 <A HREF="history.html">Version History</A> section.</P>


    <h2><a name="142_15">Updating From 1.4.2 to 1.5</a></h2>
    
    <font color="red">Points:
    - Database changes
    - New configuration items
    - New build system
    
    
    </font>
    
    

    <h2><a name="141_142">Updating From 1.4.1 to 1.4.2</a></h2>
See <A HREF="#14_14x">Updating From 1.4 to 1.4.x</A>; the same instructions apply.

    <h2><a name="14_14x">Updating From 1.4 to 1.4.x</a></h2>

   <p>The changes in 1.4.x releases are only code and configuration changes so the update is simply a matter of rebuilding the wars and slight changes to your config file.</p>
<commit_msg>(<NAME>)  Added upgrade instructions for DSpace 1.4.2 to DSpace 1.5<commit_after><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
  <HEAD>
    <TITLE>DSpace System Documentation: Updating a DSpace Installation</TITLE>
    <LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
  </HEAD>
  <BODY>
    <H1>DSpace System Documentation: Updating a DSpace Installation</H1>

    <P><A HREF="index.html">Back to contents</A></P>

    <P>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 <A HREF="history.html">Version History</A> section.</P>


    <h2><a name="142_15">Updating From 1.4.2 to 1.5</a></h2>
 
 <p>The changes in DSpace 1.5 are significant and wide spread involving database schema upgrades, code restructuring, completely new user and programatic interfaces, and new build system.</p>
 
 <p>In the notes below <code>[dspace]</code>code> refers to the install directory for your existing DSpace installation, 
 and <code>[dspace-source]</code> to the source directory for DSpace 1.5. Whenever you see these path references,
  be sure to replace them with the actual path names on your local system.</p>  
    
    
<ol>

<li><b>Backup your DSpace</b>
<p>First and foremost, make a complete backup of your system, including:</p>
<ul>
<li>A snapshot of the database</li>
<li>The asset store (<code>[dspace]/assetstore</code> by default)</li>
<li>Your configuration files and customizations to DSpace</li>
</ul><br/></li>


<li><b>Download DSpace 1.5</b>
<p>Get the new DSpace 1.5 source code either as a download from <a href="http://sourceforge.net/project/showfiles.php?group_id=19984">SourceForge</a> or check it out directly from the <a href="http://sourceforge.net/svn/?group_id=19984">SVN code repository</a>.  If you downloaded DSpace do not unpack it on top of your existing installation.</p> 
</li>    


<li><b>Build DSpace</b>
<p>The build process has radically changed for DSpace 1.5. With this new release the build system has moved to a maven-based system enabling the various projects (JSPUI, XMLUI, OAI, and Core API) into separate projects. See the <a href="file:///Users/scott/Development/Workspaces/DSpace1.5/dspace-1.5/dspace/docs/install.html">Installation section</a> for more information on building DSpace using the new maven-based build system. Run the following commands to compile DSpace.</p>
<pre>  
  cd [dspace-source]/dspace;
  mvn package
</pre>
<p>You will find the result in <code>[dspace-source]/dspace/target/dspace-1.5-build.dir/</code>; inside this directory is the compiled binary distribution of DSpace.</p>
</li>


<li><b>Stop Tomcat</b>  
<p>Take down your servlet container, for Tomcat use the <code>bin/shutdown.sh</code> script. 	  
</li>


<li><b>Update <code>dspace.cfg</code></b>
<p>Serveral new parameters need to be added to your <code>[dspace]/config/dspace.cfg</code>. While it is advisable to start with a fresh <i>DSpace 1.5 <code>dspace.cfg</code> configuration file</i> here are the minimum set of parameters that need to be added to an old <i>DSpace 1.4.2 configuration</i>.</p>
<pre>

#### Stackable Authentication Methods #####
#
# Stack of authentication methods
#  (See org.dspace.authenticate.AuthenticationManager)
# Note when upgrading you should remove the parameter: 
#  plugin.sequence.org.dspace.eperson.AuthenticationMethod
plugin.sequence.org.dspace.authenticate.AuthenticationMethod = \
        org.dspace.authenticate.PasswordAuthentication

###### JSPUI item sytle plugin #####
#
# Specify which strategy use for select the style for an item
plugin.single.org.dspace.app.webui.util.StyleSelection = \
                       org.dspace.app.webui.util.CollectionStyleSelection
   	
   	
###### Browse Configuration ######
#
# The following configuration will mimic the previous 
# behavior exhibited  by DSpace 1.4.2. For alternative
# configurations see the manual.

# Browse indexes
webui.browse.index.1 = dateissued:item:dateissued
webui.browse.index.2 = author:metadata:dc.contributor.*:text
webui.browse.index.3 = title:item:title
webui.browse.index.4 = subject:metadata:dc.subject.*:text

# Sorting options
webui.itemlist.sort-option.1 = title:dc.title:title
webui.itemlist.sort-option.2 = dateissued:dc.date.issued:date
webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
   	
# Recent submissions
recent.submissions.count = 5

# Itemmapper browse index
itemmap.author.index = author

# Recent submission processor plugins
plugin.sequence.org.dspace.plugin.CommunityHomeProcessor = \
	org.dspace.app.webui.components.RecentCommunitySubmissions
plugin.sequence.org.dspace.plugin.CollectionHomeProcessor = \
	org.dspace.app.webui.components.RecentCollectionSubmissions

#### Content Inline Disposition Threshold ####
#
# Set the max size of a bitstream that can be served inline
# Use -1 to force all bitstream to be served inline
# webui.content_disposition_threshold = -1
webui.content_disposition_threshold = 8388608

#### Event System Configuration ####
#
# default synchronous dispatcher (same behavior as traditional DSpace)
event.dispatcher.default.class = org.dspace.event.BasicDispatcher
event.dispatcher.default.consumers = search, browse, eperson

# consumer to maintain the search index
event.consumer.search.class = org.dspace.search.SearchConsumer
event.consumer.search.filters = Item|Collection|Community|Bundle+Create|Modify|Modify_Metadata|Delete:Bundle+Add|Remove

# consumer to maintain the browse index
event.consumer.browse.class = org.dspace.browse.BrowseConsumer
event.consumer.browse.filters = Item+Create|Modify|Modify_Metadata:Collection+Add|Remove

# consumer related to EPerson changes
event.consumer.eperson.class = org.dspace.eperson.EPersonConsumer
event.consumer.eperson.filters = EPerson+Create
</pre>



<li><b>Add <code>xmlui.xconf</code> Manakin configuration</b>
<p>The new Manakin user interface available with DSpace 1.5 requires an extra configuration file that you will need to manually copy over to your configuration directory. </p>
<pre>
cp [dspace-source]/dspace/config/xmlui.xconf [dspace]/config/xmlui.xconf
</pre>
</li>



<li><b>Update the database</b>
<p>The database schema needs updating. SQL files contain the relevant updates are provided, note if you have made any local customizations to the database schema you should consult these updates and make sure they will work for you.</p>
<ul>
<li>For PostgreSQL
<p><code>psql -U [dspace-user] -f [dspace-source]/dspace/etc/database_schema_14-15.sql [database-name]</code></p>
</li>
<li>For Oracle
<p><code>[dspace-source]/dspace/etc/oracle/database_schema_142-15.sql</code> contains the 
commands necessary to upgrade your database schema on oracle.</p>
</li></ul></li>  



<li><b>Apply any customizations</b>
<p>If you have made any local customizations to your DSpace installation they will need to be migrated over to the new DSpace. Commonly these modifications are made to "JSP" pages located inside the <code>[dspace 1.4.2]/jsp/local</code> directory. These should be moved 
<code>[dspace-source]/modules/dspace-jspui/src/main/webapp/</code> in the new build structure. See <a href="file:///Users/scott/Development/Workspaces/DSpace1.5/dspace-1.5/dspace/docs/configure.html#jspui-jsp">Customizing the JSP Pages</a> for more information.  
</li>
	
	
	
	
	
<li><b>Update DSpace</b>
<p> Update the DSpace installed directory with new code and libraries. Inside the <code>[dspace-source]/dspace/target/dspace-1.5-build.dir/</code> directory run:</p>
<pre>
cd [dspace-source]/dspace/target/dspace-1.5-build.dir/;	
ant -Dconfig=[dspace]/config/dspace.cfg update
</pre>
</li> 	




<li><b>Rebuild browse and search indexes</b>
<p>One of the major new features of DSpace 1.5 is the browse system which necessitates that the indexes be recreated. To do this run the following command from your DSpace installed directory:</p>
<pre>
[dspace]/bin/index-init
</pre>
</li>
   	
   	
<li><b>Deploy webapplications</b>
<p>Copy the webapplications files from your [dspace]/webapps directory to the subdirectory of your servlet container (e.g. Tomcat):</p>
<pre>
cp [dspace]/webapps/* [tomcat]/webapps/
</pre>
</li>
   	
   	
   	
   	
<li><b>Restart Tomcat</b>
<p>Restart your servlet container, for Tomcat use the <code>bin/startup.sh</code> script. </p>
</li>

</ol>
    
    
    

    <h2><a name="141_142">Updating From 1.4.1 to 1.4.2</a></h2>
See <A HREF="#14_14x">Updating From 1.4 to 1.4.x</A>; the same instructions apply.

    <h2><a name="14_14x">Updating From 1.4 to 1.4.x</a></h2>

   <p>The changes in 1.4.x releases are only code and configuration changes so the update is simply a matter of rebuilding the wars and slight changes to your config file.</p>

{'fraction_non_alphanumeric': 0.12481716235982447, 'fraction_numerical': 0.019307654802535348, 'mean_word_length': 4.338885996876627, 'pattern_counts': {'":': 0, '<': 226, '<?xml version=': 0, '>': 227, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7022408', 'n_tokens_mistral': 3456, 'n_tokens_neox': 3222, 'n_words': 1006}