The steps below should see you through the upgrade of a standard Islandora installation to the latest versions of Apache Solr and Fedora GSearch.
DO NOT stop the fedora service before beginning these steps. |
1. Confirm that Apache ant is installed
ant -version |
2. Remove the current Fedora GSearch .war file
rm -f $FEDORA_HOME/tomcat/webapps/fedoragsearch.war |
3. Remove the current Apache Solr .war file
rm -f /opt/solr/apache-solr-1.4.1.war |
4. Copy the new Fedora GSearch .war file into place
cp /staging/fedoragsearch-2.5/fedoragsearch.war $FEDORA_HOME/tomcat/webapps/ |
5. Change ownership of the new GSearch .war file to user 'fedora'.
chown fedora:fedora /usr/local/fedora/tomcat/webapps/fedoragsearch.war |
6. Copy the /example/solr directory into place
cp -r /staging/apache-solr-3.6.0/example/solr $FEDORA_HOME/solr |
7. Change ownership of the new /solr directory to user 'fedora'
chown fedora:fedora $FEDORA_HOME/solr/ |
8. Copy the new Apache Solr file into place
cp /staging/apache-solr-3.6.0/example/webapps/solr.war $FEDORA_HOME/tomcat/webapps/ |
9. Change ownership of the new Solr .war file to user 'fedora'.
chown fedora:fedora$FEDORA_HOME/tomcat/webapps/solr.war |
10. Edit the fedora-users.xml and fgsconfig-basic.properties files
10a. fedora-users.xml
vi $FEDORA_HOME/server/config/fedora-users.xml |
Add the following section...
> # add additional user > > <user name="fgsAdmin" password="[password]"> > <attribute name="fedoraRole"> > <value>administrator</value> > </attribute> > </user> |
10b. fgsconfig-basic.properties
vi $FEDORA_HOME/tomcat/webapps/fedoragsearch/FgsConfig/fgsconfig-basic.properties |
Change, or uncomment, each of the following lines. When uncommenting a line in a particular section, make sure to also comment out the original line that was 'selected' in that section.
> configDisplayName=configProductionOnSolr > gsearchPass= [password] > local.FEDORA_HOME=/usr/local/fedora > namesOfRepositories=FgsRepos > namesOfIndexes=FgsIndex (keep name in order not to modify GUI for GSearch) > fedoraBase=http://localhost:8080 (to access objects from index in GUI for GSearch) > fedoraPass=[password] > indexEngine=Solr > indexBase=http://localhost:8080/solr > indexDir=${local.FEDORA_HOME}/solr/data/index > indexingDocXslt=foxmlToSolr |
11. Change to the /FgsConfig directory
cd $FEDORA_HOME/tomcat/webapps/fedoragsearch/FgsConfig |
12. Run ant on the fgsconfig-basic.xml file
ant -f fgsconfig-basic.xml |
You should see a message similar to:
BUILD SUCCESSFUL Total time: 0 seconds |
13. Rename the current Solr schema.xml file to schema.bak
mv $FEDORA_HOME/solr/conf/schema.xml $FEDORA_HOME/solr/conf/schema.bak |
14. Copy the new, ant-generated Solr schema into place as schema.xml
cp $FEDORA_HOME/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/conf/schema-3.6.1-for-fgs-2.5.xml $FEDORA_HOME/solr/conf/schema.xml |
15. Stop/Start the Fedora service
$FEDORA_HOME/tomcat/bin/shutdown.sh $FEDORA_HOME/tomcat/bin/startup.sh |
16. Test the upgrade
Thank you to Charles Birmingham for providing the basis for this section.