It took nearly one afternoon to configure SOLR. The main problem is
You can set the SOLR master location in one of the following ways:
1. Set the java system property SOLR. SOLR. Home (yes, It is SOLR. SOLR. Home ).
2. Configure a JNDI lookup for Java: COMP/ENV/SOLR/home to point to the SOLR directory.
3. Start the servlet container in the directory that contains the SOLR directory. (Default
The SOLR main directory is SOLR under the current working directory .)
I use the second one (2. Configure a JNDI lookup for Java: COMP/ENV/SOLR/home to point to the SOLR directory ..)
Installation steps:
Download the zip package of SOLR and decompress it. Rename the war file under the DIST directory to SOLR. War and copy it directly to the webapps directory of Tomcat.
Be sure to set the SOLR master location. There are three methods. I used a JNDI configuration of Java: COMP/ENV/SOLR/home in Tomcat pointing to the SOLR home directory (under the example directory ), create/tomcat installation directory/CONF/Catalina/localhost/SOLR. XML file.
<Context docbase = "D:/SOLR. War" DEBUG = "0" crosscontext = "true">
<Environment name = "SOLR/home" type = "Java. Lang. String" value = "D:/SOLR" override = "true"/>
</Context>
My main problem lies in the setting of environment value and name.
Variable 1: here we will explain the context docbase = "SOLR. War directory. If it is stored in the/tomcat installation directory/webapps, it will be like this/SOLR. War ".
Variable 2: Environment name = "SOLR/home" must be written in this way. It is possible that SOLR is the home directory of SOLR by default (remember to write this statement ).
Variable 3: environment value = "D:/SOLR" value, which is the SOLR Directory, which includes the bin, Conf, and other directories.
I am suffering from these three variables. After a long time, I remember the settings of several variables.
Finally, start Tomcat. Enter http: // localhost: 8080/SOLR/admin/to display the management page.