lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolrTomcat" by HossMan
Date Sat, 22 Mar 2008 01:40:16 GMT
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:
rearrange some things to get example install first, then configs

------------------------------------------------------------------------------
  = Solr with Apache Tomcat =
+ 
-  * Solr runs fine with [http://tomcat.apache.org/ Tomcat], see the instructions in the generic
[wiki:SolrInstall Solr installation] page
+ Solr runs fine with [http://tomcat.apache.org/ Tomcat], see the instructions in the generic
[wiki:SolrInstall Solr installation] page for general info before consulting this page.
-  * The latest version of Tomcat 5.5 - the "Core" Binary Distribution is recommended.
  
  [[TableOfContents]]
- 
- == Optional Configuration ==
- === Logging ===
- 
- For information about controlling JDK Logging (aka: java.util logging) in Tomcat, please
consult the Tomcat docs...
- http://tomcat.apache.org/tomcat-6.0-doc/logging.html
- 
- === URI Charset Config ===
- If you are going to '''query''' Solr using international characters (>127) using HTTP-GET,
you must configure Tomcat to conform to the URI standard by accepting percent-encoded UTF-8.
- 
- Edit Tomcat's conf/server.xml and add the following attribute to the correct Connector element:
URIEncoding="UTF-8".
- {{{
- <Server ...>
-  <Service ...>
-    <Connector ... URIEncoding="UTF-8"/>
-      ...
-    </Connector>
-  </Service>
- </Server>
- }}}
- 
- This is only an issue when sending non-ascii characters in a query request... no configuration
is needed for Solr/Tomcat to return non-ascii chars in a response, or accept non-ascii chars
in an HTTP-POST body.
  
  == Simple Example Install ==
  
  People have occasionally reported problems getting Solr to work with Tomcat -- usually as
a result of confusion stemming from the multitudes of ways tomcat can be installed and configured
(particularly if tomcat is installed by some package management system designed for the specific
OS).
  
- These steps illustrate the minimal possible steps needed to install both Tomcat and Solr
from scratch...
+ These steps illustrate the minimal possible steps needed to install both Tomcat and Solr
from scratch by relying on the default "Solr Home Dir" ...
  
  {{{
  #if you copy this to a shell script, make sure to run dos2unix on it to ensure correct line-endings
@@ -56, +34 @@

  
  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/"}}}
  
+ ...or use a Context file to configure the Solr Home using JNDI (see below)
  
+ == Optional Configuration ==
  
+ === Logging ===
+ 
+ For information about controlling JDK Logging (aka: java.util logging) in Tomcat, please
consult the Tomcat docs...
+ http://tomcat.apache.org/tomcat-6.0-doc/logging.html
+ 
+ === URI Charset Config ===
+ If you are going to '''query''' Solr using international characters (>127) using HTTP-GET,
you must configure Tomcat to conform to the URI standard by accepting percent-encoded UTF-8.
+ 
+ Edit Tomcat's conf/server.xml and add the following attribute to the correct Connector element:
URIEncoding="UTF-8".
+ {{{
+ <Server ...>
+  <Service ...>
+    <Connector ... URIEncoding="UTF-8"/>
+      ...
+    </Connector>
+  </Service>
+ </Server>
+ }}}
+ 
+ This is only an issue when sending non-ascii characters in a query request... no configuration
is needed for Solr/Tomcat to return non-ascii chars in a response, or accept non-ascii chars
in an HTTP-POST body.
+ 
- == Configuring Solr Home with JNDI ==
+ === 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 5 and 6 ===
  
  Just put a context fragment file under $CATALINA_HOME/conf/Catalina/localhost that looks
something like this...
  
@@ -77, +75 @@

  }}}
  
  A few things to keep in mind:
+    * The "conf/Catalina/localhost" directory may not exist by default in your installation.
 You may have to create it.
     * For Tomcat 5.5 and later, the war file must be stored outside of the webapps directory
for this to work.  Otherwise, this Context element is ignored.
     * Prior to Tomcat 5.5, a "path" attribute was required for Context elements (starting
with 5.5, the path attribute must not be used except when statically defining a Context in
server.xml, as it will be inferred from the Context fragment filename.
  
@@ -125, +124 @@

   * Go to the solr admin page to verify that the installation is working.  It will be at
http://localhost:8080/solr/admin
   
  === Multiple Solr apps ===
+ 
   * Download and install [http://tomcat.apache.org/ Tomcat] for Windows using the MSI installer.
Install it with the tcnative.dll file. Say you installed it in c:\tomcat\
   * Check if Tomcat is installed correctly by going to http://localhost:8080/
   * Change the c:\tomcat\conf\server.xml file to add the URIEncoding Connector element as
shown above.

Mime
View raw message