Preparatory work:
Currently the latest version 6.0. Download SOLR 6.0:solr6.0 Download
JDK8 Download jdk1.8:jdk1.8 "solr6.0 is based on JDK8 development"
tomcat8.0 Download: tomcat8
##################################
Before the description of the environment, in fact, after the solr5.0 SOLR has built-in jetty server, can be self-initiated. But in order to incorporate their own features,
And the application on the SOLR Foundation, this article is primarily for publishing on TOMCAT8.
##################################
1, installation Jdk8
2. After downloading the solr6.0, unzip the solr6.0 package.
3, Decompression Tomcat8
4. Copy the WebApp file under "Solr-6.0.0\server\solr-webapp" to the "Apache-tomcat-8.0.33\webapps" directory,
and rename the WebApp to SOLR (which can be renamed to take any name).
The Solr file directory is as follows:
5. Copy all jar packages under "Solr-6.0.0\server\lib\ext" to "Apache-tomcat-8.0.33\webapps\solr\web-inf\lib"
6. Copy the log4j.properties configuration file under "Solr-6.0.0\server\resources" to "apache-tomcat-8.0.33\webapps\solr\web-inf\classes", If there is no classes file under Web-inf, then create a classes folder.
7, under "APACHE-TOMCAT-8.0.33\WEBAPPS\SOLR" Create a new File "Solrhome (folder name can be arbitrarily named)", "SOLR-6.0.0\SERVER\SOLR" under the copy of all the files to just create
In the Solrhome.
The file contains the following:
8, modify the "Apache-tomcat-8.0.33\webapps\solr\web-inf" under the Web. XML, find the following code:
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/put/ Your/solr/home/here</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
By default, annotations are dropped, the annotations are released, and the values in <env-entry-value> are modified to the Solrhome directory just in step 7, such as: E:\project\Search\apache-tomcat-8.0.33\webapps\ Solr\solrhome
9, running Tomcat, after the successful operation of access: Http://localhost:8080/solr/index.html can get the following interface:
Then the entire SOLR environment has been built successfully.