Difference between revisions of "SUNScholar/Rebuild DSpace"

From Libopedia
Jump to navigation Jump to search
m (Text replace - "dspace-1.6.2" to "dspace-1.7.2")
Line 27: Line 27:
 
echo "Remove old catalina log file"
 
echo "Remove old catalina log file"
 
sudo rm /var/log/tomcat6/catalina.out
 
sudo rm /var/log/tomcat6/catalina.out
 +
echo "Fix file permissions"
 +
sudo chmod 0777 -R /home/dspace/webapps
 +
sudo chmod 0777 -R /home/dspace/solr
 
sudo /etc/init.d/tomcat6 start
 
sudo /etc/init.d/tomcat6 start
 
clear
 
clear

Revision as of 11:39, 6 July 2012

This procedure assumes that you have used the three step process to install DSpace.

Log into your server and type the following:

su - dspace
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.7.2-src-release
mvn package -U clean package
echo "Start ANT build"
cd /home/dspace/dspace-1.7.2-src-release/dspace/target/dspace-1.7.2-build.dir
ant -Doverwrite=true update clean_backups
echo "Remove old catalina log file"
sudo rm /var/log/tomcat6/catalina.out
echo "Fix file permissions"
sudo chmod 0777 -R /home/dspace/webapps
sudo chmod 0777 -R /home/dspace/solr
sudo /etc/init.d/tomcat6 start
clear
echo "To be sure, the machine needs to be re-booted to ensure that the handle server is also ok"

Save the file.

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
Back to IR Help