You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2008/03/19 07:58:31 UTC
[Solr Wiki] Update of "SolrTomcat" by HossMan
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by HossMan:
http://wiki.apache.org/solr/SolrTomcat
The comment on the change is:
move missleading info about solr home sysprop out of jndi section
------------------------------------------------------------------------------
#If you want to run the startup.sh from a different working directory.
}}}
+ In addition to using the default behavior of relying on the Solr Home being in the current working directory (./solr) you can alternately add the solr.solr.home system property to your JVM settings before starting Tomcat...
+
+
+ {{{export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/my/custom/solr/home/dir/"}}}
+
+
== Configuring Solr Home with JNDI ==
A Tomcat context fragments can be used to configure the JNDI property needed to specify your Solr Home directory.
- === Tomcat 6 ===
+ === Tomcat 5 and 6 ===
-
- The easiest way to set up Solr under Tomcat 6 is to add the solr.solr.home system property to your JVM settings. Add solr.war to your Tomcat webapps directory, and copy the entire /example/solr directory from the distributed Solr package to your solr.solr.home location. You get solr.war by renaming the apache-solr-1.2.war file to solr.war. After setting up solr.solr.home as below, start Tomcat, and you should be up and running.
-
- Set -Dsolr.solr.home=/opt/solr (...or wherever you're putting Solr) in your Tomcat JVM settings. For example,
-
- {{{export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/opt/solr"}}}
-
- === Tomcat 5 ===
Just put a context fragment file under $CATALINA_HOME/conf/Catalina/localhost that looks something like this...