I. Tomcat window
1. Configure tomcat to set catalina_home and java_home
Catalina_home = E: \ apache-Tomcat-6.0.29
Java_home = c: \ Program Files \ Java \ jdk1.6.0 _ 14
2. Copy the apache-solr-1.4.1.war in the Dist folder under the SOLR package to Tomcat's webapps and rename it SOLR. War.
3. Select a directory as SOLR. Home. For example, E: \ SOLR-Tomcat puts all the files in the example \ SOLR folder in the SOLR package into E: \ SOLR-Tomcat \ SOLR.
4. The directory where you start SOLR indexing is generated. However, SOLR has a configuration file, such as schema. XML, which is placed under SOLR. home. You must configure
SOLR determines SOLR. Home in the following order to read its configuration file. And some extension jar files
1. Check the system property SOLR. SOLR. home. You can specify it by running the Java command. For example, Java-dsolr. SOLR. Home = SOLR/-jar start. Jar start. jar can be found in the source package. Includes jetty containers.
2. Check that the JNDI path is Java: COMP/ENV/SOLR/home and can be set under src/Web-APP/web/WEB-INF/Web. xml
<Env-entry>
<Env-entry-Name> SOLR/home </env-entry-Name>
<Env-entry-value> SOLR/</env-entry-value>
<Env-entry-type> JAVA. Lang. String </env-entry-type>
</Env-entry>
3. Current running path./SOLR
Therefore, we can summarize the following methods for running SOLR:
1. Run tomcat in the current path (recommended for index files under SOLR. Home), as shown in:
E: \ SOLR-Tomcat> E: \ apache-Tomcat-6.0.29 \ bin \ Startup. bat
Note if you do not copy the apache-solr-1.4.1.war to Tomcat's webapps.
You can also go to E: \ apache-Tomcat-6.0.29 \ conf \ Server. add <context docbase = "E:/Apache-Tomcat-6.0.29/webapps/SOLR. war "DEBUG =" 0 "Path ="/solr01 "/>
To tell Tomcat where your website is
2. Create the Catalina folder in the conf folder of Tomcat, create the localhost folder in the Catalina folder, and create SOLR. xml under the folder.
<Context docbase = "C: \ Tomcat \ webapps \ SOLR. War" DEBUG = "0" crosscontext = "true">
<Environment name = "SOLR/home" type = "Java. Lang. String" value = "E:/SOLR-Tomcat/SOLR" override = "true"/>
</Context>
Double-click STARTUP. BAT to run the Tomcat index file in % atat_home % \ bin.
3. E: \ apache-Tomcat-6.0.29 \ webapps \ SOLR \ WEB-INF \ WEB. xml settings
<Env-entry>
<Env-entry-Name> SOLR/home </env-entry-Name>
<Env-entry-value> E:/SOLR-Tomcat/SOLR </env-entry-value>
<Env-entry-type> JAVA. Lang. String </env-entry-type>
</Env-entry>
Double-click STARTUP. BAT to run the Tomcat index file in % atat_home % \ bin.
4. Use the Java-D command to specify SOLR. SOLR. Home to start. Modify E: \ apache-Tomcat-6.0.29 \ bin \ Catalina. bat
In the next line of "REM ----- execute the requested command -------------------------------------", add
Set java_opts = % java_opts %-dsolr. SOLR. Home = E: \ SOLR-Tomcat \ SOLR
Run E: \ apache-Tomcat-6.0.29 \ bin \ Catalina. bat start in any directory to start Tomcat.