Solr4.8.1 and tomcat7 can be downloaded from the official website. I will not talk about it here, as shown in.
In this case, we should first decompress solr-4.8.1.zip, decompress tomcat, decompress it, and then create two folders under the current folder, one for the SOLR directory file, and the other for the SOLR project to be run by Tomcat, for example:
Copy the files under \ solr-4.8.1 \ example \ SOLR to the home folder and paste SOLR under \ solr-4.8.1 \ example \ webapps. copy the war package to the server directory, decompress it, and delete the war package, for example:
Create a folder named data in the home directory to store the index file \ home \ data and find solrconfig in the \ home \ collection1 \ conf directory. find the following lines in XML to specify the path for storing index data.
Specify the SOLR working directory, find the SOLR project in the server directory, locate web. xml under the WEB-INF, find the following code, remove the annotation, and change the value of env-entry-value to the home directory.
Here, SOLR is configured, and Tomcat is configured.
Tomcat only deploys and runs the SOLR project. Add the host node to Tomcat server. XML as follows:
Here I used the domain name directly. You can resolve search.solr.com to a local machine. Of course, you do not need to configure this complicated one here. You can add it to the context directly and enter localhost!
At this point, no error will be returned, but an error will still be returned, we need to add all jar packages under \ solr-4.8.1 \ example \ Lib \ ext to the solr project in the server. If you run Tomcat again, no error will be reported. For example:
OK. The integration of SOLR and Tomcat is complete. Next, we will continue to explain other SOLR knowledge.
Integration of solr4.8.1 and tomcat7