Difference between revisions of "SUNScholar/Rebuild DSpace"

From Libopedia
Jump to navigation Jump to search
m
 
(158 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Requirements==
+
<center>
*{{WARNING}}
+
'''[[SUNScholar/Install DSpace/S11|Back to After Installation Tasks]]'''
*<font color="red">'''It is assumed your server is open on the campus firewall. This is needed to be able to download updated MAVEN packages.'''</font>
+
</center>
==Procedure==
 
Login to your server:
 
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Prepare_Ubuntu/S01
 
Type the following:
 
mkdir /home/dspace/scripts
 
  
nano /home/dspace/scripts/build-webapps
+
==Introduction==
 +
To apply customisations, DSpace usually needs to be rebuilt, to update the Java WAR's for re-deployment by the Tomcat webapp server.
  
''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.''
+
This wiki page helps you to create a customised rebuild script that you can use later any time you need it.
  
Copy and paste the following into the open nano editor.
+
Also see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Customisation
<pre>
 
#!/bin/bash
 
sudo /etc/init.d/tomcat6 stop
 
echo "Cleaning out old xmlui cache files"
 
sudo rm /var/lib/tomcat6/work/Catalina/localhost/_/cache-dir/cocoon-ehcache.data
 
sudo rm /var/lib/tomcat6/work/Catalina/localhost/_/cache-dir/cocoon-ehcache.index
 
echo "Clean out old webapps"
 
sudo rm -rf /home/dspace/webapps/*
 
echo "Start MAVEN packaging"
 
cd /home/dspace/dspace-1.7.2-src-release
 
mvn -U clean package
 
echo "Start ANT build"
 
cd /home/dspace/dspace-1.7.2-src-release/dspace/target/dspace-1.7.2-build.dir
 
## Optional. Remove the hash sign to activate geolite database updates.
 
## Your server should be open on the internet before you do this.
 
#ant update_geolite
 
ant -Doverwrite=true update clean_backups
 
echo "Remove old catalina log file"
 
sudo rm /var/log/tomcat6/catalina.out
 
sudo /etc/init.d/tomcat6 restart
 
clear
 
echo "Rebuild complete."
 
</pre>
 
  
{{NANO}}
+
==Requirements==
 +
<font color="red">'''[[SUNScholar/Install_DSpace/S03#Step_3.2|Click here]] to setup the "source" folder first.'''</font>
 +
==Instructions==
 +
===[[SUNScholar/Rebuild_DSpace/5X|For DSpace Versions =>5.X]]===
 +
===[[SUNScholar/Rebuild_DSpace/4X|For DSpace Versions <=4.X]]===
  
Type the following:
+
==Tips==
chmod 0755 /home/dspace/scripts/build-webapps
+
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.
  
Now you can rebuild DSpace by typing the following at anytime.
+
==References==
/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
  
==Tip==
+
===General references===
Every weekend during a quiet time I run the rebuild script to make sure the server is good to use the following week.
+
*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
  
==References==
+
{{Tomcat7}}
*https://wiki.duraspace.org/display/DSPACE/Rebuild+DSpace
+
 
'''[[SUNScholar/System Admin|Back to System Admin]]'''
+
[[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.