One easy way is to put the solr folder with configuration files (schema.xml,
solrconfig.xml)
in the folder where you start Tomcat from. For example, i have the following
folder structure -

--> Tomcat Home
   --> solr
      --> conf (contains the configuration files)
      --> bin

I copied over the solr folder from the <solr_install_home>/example folder as
is.
Then start tomcat from the <Tomcat home> folder. Solr will automatically
look for
the 'solr' folder in the directory from which you started tomcat. This way
you can
avoid editing anything in the tomcat configuration.

If you want to add solr to an already existing tomcat instance, follow the
steps
around adding solr as a context to the catalina configuration for the
server.


David Arpad Geller wrote:
> 
> I normally wouldn't just signup to a list and post immediately but...
> 
> I hope there are some Tomcat experts here.
> I'm trying to setup solr and tomcat.  I get the following:
> 
> INFO: HTMLManager: start: Starting web application at '/solr'
> Mar 19, 2008 12:57:26 AM org.apache.solr.servlet.SolrDispatchFilter init
> INFO: SolrDispatchFilter.init()
> Mar 19, 2008 12:57:26 AM org.apache.solr.core.Config getInstanceDir
> INFO: No /solr/home in JNDI
> Mar 19, 2008 12:57:26 AM org.apache.solr.core.Config getInstanceDir
> INFO: Solr home defaulted to 'null' (could not find system property or
> JNDI)
> Mar 19, 2008 12:57:26 AM org.apache.solr.core.Config setInstanceDir
> INFO: Solr home set to 'solr/'
> Mar 19, 2008 12:57:26 AM org.apache.catalina.core.StandardContext 
> filterStart
> SEVERE: Exception starting filter SolrRequestFilter
> 
> 
> I get that I should be specifying my solr home somewhere and some have 
> suggested that it should be specified in 
> $CATALINA_HOME/conf/Catalina/localhost  Others have mentioned specifying 
> <Context> in a solr.xml file placed in the $CATALINA_HOME/conf 
> directory.  Others have said that solr.war is a special webapp that 
> should not be placed in the standard Tomcat webapps directory and 
> JAVA_OPTS should have solr.solr.home set.  Huh?  Where? I tried setting 
> it in the ENV before starting Tomcat to no avail. Sigh.
> 
> Help!
> 
> I'm running Tomcat 6.0.16 and SOLR 1.2.0
> 
> 1. What the heck is a "conf/Catalina/localhost?"  Is it a directory?  A 
> file?  I have neither a Catalina or a localhost directory there.
> 2. Tomcat does absolutely nothing unless I put solr.war in its webapps 
> directory.  Then I can get it to fail on solr, at least.
> 3. I tried putting the following into my server.xml file (no effect):
> 
> <Context
>    docBase="/usr/local/solr/dist/apache-solr-1.2.0.war"
>    debug="0"
>    crossContext="true" >
> 
>    <Environment name="solr/home"
>                 value="/usr/local/solr"
>                 type="java.lang.String"
>                 override="true" />
> </Context>
> 
> 
> 4. I tried putting the same into my context.xml file but then it just 
> overrode the context for the manager and ruined that whole thing for me.
> 
> Honestly.  Any help would be *much* appreciated but shouldn't Tomcat be 
> the easiest way to run SOLR?
> 
> Thank you,
> David
> 
> 

-- 
View this message in context: 
http://www.nabble.com/introduction-and-help%21-tp16137526p16237615.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to