I just deployed SOLR under tomcat, so I ran out of it. I'm so excited. Call ~
In fact, as long as the following conditions are met, the deployment will not fail:
1. Realize that SOLR is a webapp role;
2. Download the war package under the SOLR directory DIST and put it under the Tomcat \ webapps directory.
3. start Tomcat;
4. after Tomcat is started, the war package is automatically loaded. You can see that the SOLR directory is automatically generated under webapps (because I changed the war package name to "SOLR, open the WEB-INF \ Web under this directory. XML, make the following step 5 changes:
5. There is a paragraph like thisCode
<Env-entry> <env-entry-Name> SOLR/home </env-entry-Name> <env-entry-value>G: \ apache-Tomcat-6.0.20 \ SOLR</Env-entry-value> <env-entry-type> JAVA. Lang. String </env-entry-type> </env-entry>
Remove the comments of this Code. Of courseG: \ apache-Tomcat-6.0.20 \ SOLRThis is a change, which will be explained below.
6. [explanation] Where does G: \ apache-Tomcat-6.0.20 \ SOLR come from? Find the example \ SOLR directory of the SOLR source package, copy the SOLR directory, and paste it to the Tomcat directory (G: \ apache-Tomcat-6.0.20 \ SOLR) of course, you can put it anywhere, but you just need to record this directory and configure it<Env-entry-value>.
7. The entire process is completed. If an error is returned, no error is reported. Restart Tomcat and load it correctly (no exception is reported). Open the browser and enter the access path to test: http: // localhost: 8080/SOLR. The deployment is successful!
Solo/home is SOLR's home, and the address to which it points must be read by Tomcat. This is what the XML just mentioned here is. Tomcat loads the Web. xml file corresponding to SOLR to read when it starts the SOLR webapp.
The first step of the long journey was completed.
* >_< *