Difference between revisions of "SUNScholar/Rebuild DSpace"

From Libopedia
Jump to navigation Jump to search
m
 
(196 intermediate revisions by the same user not shown)
Line 1: Line 1:
Log into your server and type the following:
+
<center>
  su - dspace
+
  '''[[SUNScholar/Install DSpace/S11|Back to After Installation Tasks]]'''
 +
</center>
  
mkdir /home/dspace/scripts
+
==Introduction==
 +
To apply customisations, DSpace usually needs to be rebuilt, to update the Java WAR's for re-deployment by the Tomcat webapp server.
  
nano /home/dspace/scripts/build-webapps
+
This wiki page helps you to create a customised rebuild script that you can use later any time you need it.
  
''Tip: It is always a good idea to maximise the open nano window so that the copy and paste of long lines does not wrap around.''
+
Also see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Customisation
  
Copy and paste the following into the open nano editor.
+
==Requirements==
<pre>
+
<font color="red">'''[[SUNScholar/Install_DSpace/S03#Step_3.2|Click here]] to setup the "source" folder first.'''</font>
#!/bin/bash
+
==Instructions==
clear
+
===[[SUNScholar/Rebuild_DSpace/5X|For DSpace Versions =>5.X]]===
echo "Please wait."
+
===[[SUNScholar/Rebuild_DSpace/4X|For DSpace Versions <=4.X]]===
cd /home/dspace/dspace-1.6.2-src-release
 
mvn package
 
cd /home/dspace/dspace-1.6.2-src-release/dspace/target/dspace-1.6.2-build.dir
 
ant -Doverwrite=true update clean_backups
 
sudo /etc/init.d/tomcat6 restart
 
sleep 2
 
clear
 
echo "********************************************************************************************************************"
 
echo "Please redeploy as needed when presentation changes have been made if any interface has been made the Tomcat ROOT."
 
echo "********************************************************************************************************************"
 
</pre>
 
Replace '''dspace-1.6.2''' with '''dspace-1.6.0''' for DSpace version 1.6.0.
 
  
Press '''CTL+O''' and '''CTL+X''' to save the file and exit nano.
+
==Tips==
 +
The output of the build and compile process can be sent to a log file on Linux systems. Simply append '''"<tt>> compile.log</tt>"''' or '''"<tt>> update.log</tt>'''" to the command line instruction.
  
Type the following:
+
==References==
chmod 0755 /home/dspace/scripts/build-webapps
+
==="ant" target references===
 +
*https://wiki.duraspace.org/display/DSDOC4x/Ant+targets+and+options
 +
*https://wiki.duraspace.org/display/DSDOC3x/Appendix+B
  
Now you can rebuild Dspace by typing the following at anytime.
+
===General references===
/home/dspace/scripts/build-webapps
+
*https://github.com/DSpace/demo.dspace.org/blob/master/scripts/linux/reset-dspace-content
 +
*https://wiki.duraspace.org/display/DSDOC3x/Rebuild+DSpace
 +
*https://wiki.duraspace.org/display/DSPACE/Rebuild+DSpace
 +
 
 +
{{Tomcat7}}
 +
 
 +
[[Category:System Administration]]
 +
[[Category:Customisation]]
 +
[[Category:Installation]]
 +
__NOTOC__

Latest revision as of 23:57, 9 June 2016

Back to After Installation Tasks

Introduction

To apply customisations, DSpace usually needs to be rebuilt, to update the Java WAR's for re-deployment by the Tomcat webapp server.

This wiki page helps you to create a customised rebuild script that you can use later any time you need it.

Also see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Customisation

Requirements

Click here to setup the "source" folder first.

Instructions

For DSpace Versions =>5.X

For DSpace Versions <=4.X

Tips

The output of the build and compile process can be sent to a log file on Linux systems. Simply append "> compile.log" or "> update.log" to the command line instruction.

References

"ant" target references

General references

When using the Ubuntu 16.04 LTS server change all instances of tomcat to tomcat8.
When using the Ubuntu 14.04 LTS server change all instances of tomcat to tomcat7.
When using the Ubuntu 12.04 LTS server change all instances of tomcat to tomcat6.