Integration of solr4.8.1 and tomcat7

Source: Internet
Author: User
Tags solr

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.