Difference between revisions of "SUNScholar/Rebuild DSpace"
Jump to navigation
Jump to search
(→Tip) |
|||
| Line 48: | Line 48: | ||
==Tip== | ==Tip== | ||
Every weekend during a quiet time I run the rebuild script to make sure the server is good to use the following week. | Every weekend during a quiet time I run the rebuild script to make sure the server is good to use the following week. | ||
| − | + | ==Please Note== | |
Notes from the upgrade of 1.8 to 3.0 about "ant" builds. | Notes from the upgrade of 1.8 to 3.0 about "ant" builds. | ||
<pre> | <pre> | ||
| Line 57: | Line 57: | ||
[dspace-source]/dspace/config/ over to *.new files. | [dspace-source]/dspace/config/ over to *.new files. | ||
</pre> | </pre> | ||
| + | |||
==References== | ==References== | ||
*https://wiki.duraspace.org/display/DSPACE/Rebuild+DSpace | *https://wiki.duraspace.org/display/DSPACE/Rebuild+DSpace | ||
'''[[SUNScholar/System Admin|Back to System Admin]]''' | '''[[SUNScholar/System Admin|Back to System Admin]]''' | ||
Revision as of 11:43, 3 December 2012
Requirements
- This wiki help page assumes that you have used the three system setup procedures to install an Ubuntu server with DSpace software.
- It is assumed your server is open on the campus firewall. This is needed to be able to download updated MAVEN packages.
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
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.
Copy and paste the following into the open nano editor.
#!/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.8.2-src-release mvn -U clean package echo "Start ANT build" cd /home/dspace/dspace-1.8.2-src-release/dspace/target/dspace-1.8.2-build ## 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 ant update_configs echo "Remove old catalina log file" sudo rm /var/log/tomcat6/catalina.out sudo /etc/init.d/tomcat6 restart echo "Rebuild complete."
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Type the following:
chmod 0755 /home/dspace/scripts/build-webapps
Now you can rebuild DSpace by typing the following at anytime.
/home/dspace/scripts/build-webapps
After the rebuild check that the config files have been copied over from the source folder correctly.
Tip
Every weekend during a quiet time I run the rebuild script to make sure the server is good to use the following week.
Please Note
Notes from the upgrade of 1.8 to 3.0 about "ant" builds.
Please note that there are in fact two options available, choose whichever you prefer :- "ant update_configs" ==> Moves existing configs in [dspace]/config/ to *.old files and replaces them with what is in [dspace-source]/dspace/config/ "ant -Doverwrite=false update_configs" ==> Leaves existing configs in [dspace]/config/ intact. Just copies new configs from [dspace-source]/dspace/config/ over to *.new files.
References
Back to System Admin