Solr installation
common tasks
- start: bhladmin@bhl-int1: sudo /etc/init.d/jetty start
- stop: bhladmin@bhl-int1: sudo /etc/init.d/jetty stop
- status: bhladmin@bhl-int1: sudo /etc/init.d/jetty status
- reindexing solr:
HOST="bhl-int1"
FOXML_FOLDER=/mnt/nfs/dev/data/archival-storage/fedora/data/objectStore
WEBAPP="fedoragsearch"
# fedora on 8080, solr on 8983
PORT="8080"
#
# clear the solr index
#
ssh $HOST "/usr/bin/sudo /etc/init.d/jetty stop"
rm -r /mnt/nfs/dev/data/data-management/solr/core/data/*
ssh $HOST "/usr/bin/sudo /etc/init.d/jetty start"
#
# trigger indexing
#
#
curl --user fgsAdmin:$GS_PASSWORD "http://$HOST:$PORT/$WEBAPP/rest?operation=updateIndex&action=fromFoxmlFiles&value=${FOXML_FOLDER}"
- option 2) run the script in /mnt/nfs/test/opt/scripts/post2solrByGsearch/post2solr.sh
location
- Github: https://github.com/bhle/bhle/tree/master/data-management/solr
- web-application: /mnt/nfs/dev/data/data-management/solr
- application-container:/usr/share/jetty/
- lib: /mnt/nfs/dev/opt/data-management/solr/lib
- /mnt/nfs/dev/data/data-management/solr/solr.xml
- /mnt/nfs/dev/opt/data-management/solr/core/conf (symlink to /home/bhladmin/dev/opt/data-management/solr/core/conf )
- /etc/default/jetty
- logs: /var/log/jetty/${TIMESTAMP}.stderrout.log
- data: /mnt/nfs/dev/data/data-management/solr/core/data
dependencies
- gsearch: solr data home
- portal: solr URL
modifying config files
- solr.xml: restart jetty
- core/conf: reindex
- /etc/default/jetty: restart jetty; if data home has changed: change fgsearch index.properties; adapt jenkins jobs; adapt portal?; THINK!
how to test if it's working
login information if necessary
proxy information
currently solr 3.3.0. is being installed in Jetty:
solr home: /mnt/nfs-demeter/development/data/data-management/solr
core: used by Gsearch
install jetty:
sudo apt-get install jetty libjetty-extra
configure jetty:
sudo vi /etc/default/jetty
- set port to 8983
- allow any host to connect
- set JVM ARGS: -Dsolr.solr.home=/mnt/nfs-demeter/development/data/data-management/solr
copy the solr war to /usr/lib/jetty/webapp/:
cp /mnt/nfs-demeter/apache-solr-3.3.0/dist/apache-solr*.war /usr/lib/jetty/webapp/solr.war
restart Jetty:
sudo /etc/init.d/jetty restart
Also, the configuration of solr will effect Gsearch, please refer to
/mnt/nfs-demeter/development/opt/archival-storage/fedora/tomcat/webapps/fedoragsearch/FgsConfig/fgsconfig-basic.properties
after modifying it, run
ant -f fgsconfig-basic.xml
to update the configuration of gsearch