Set up solr5.2.1 and solr5.2.1

Source: Internet
Author: User

Set up solr5.2.1 and solr5.2.1

1, download Tomcat and solr-5.2.1 and unzip, Tomcat unzip directory is: E: \ apache-tomcat-7.0.62, solr unzip directory is: E: \ solr-5.2.1

2. Deploy solr to Tomcat 1), copy the solr folder under E: \ solr-5.2.1 \ example-DIH directory to the root directory of tomcat, that is: E: \ apache-tomcat-7.0.62 \ 2), put E: \ solr-5.2.1 \ server \ webapps directory solr. copy the war package to the E: \ apache-tomcat-7.0.62 \ webapps directory. start Tomcat. After Tomcat is started successfully, a solr folder Tomcat is automatically generated in this directory. Start: e: \ apache-tomcat-7.0.62 \ bin \ startup. bat Tomcat closed: E: \ apache-tomcat-7.0.62 \ bin \ shutdown. bat 3), modify E: \ apache-tomcat-7.0.62 \ webapps \ solr \ WEB-INF \ web. xml, find the <env-entry> node, which is in the commented state, remove the comment, and modify it according to the following code:
1 <env-entry> 2 <env-entry-name> solr/home </env-entry-name> 3 <! -- This path should be the root directory of Tomcat --> 4 <env-entry-value> E: \ apache-tomcat-7.0.62 \ solr </env-entry-value> 5 <env-entry-type> java. lang. string </env-entry-type> 6 </env-entry>
4) Copy all jar packages under the E: \ solr-5.2.1 \ server \ lib \ ext directory to the E: \ apache-tomcat-7.0.62 \ webapps \ solr \ WEB-INF \ lib directory. 5), Will E: \ solr-5.2.1 \ server \ resources Directory of log4j. properties is placed in the E: \ apache-tomcat-7.0.62 \ webapps \ solr \ WEB-INF \ classes directory, if the classes Folder does not exist, manually create a new one. 6), copy the solr-5.2.1 and solr-dataimporthandler-5.2.1.jar under the E: \ solr-dataimporthandler-extras-5.2.1.jar \ dist directory to the E: \ apache-tomcat-7.0.62 \ webapps \ solr \ WEB-INF \ lib directory, disable and restart Tomcat. 3. Test: Enter http: // localhost: 8080/solr in the address bar of the browser. If the following interface is displayed, the solr environment is successfully set up. 4. Copy the contrib and dist folders under the E: \ solr-5.2.1 directory to the Tomcat root directory. 5. Open the solr folder copied in step (1): E: \ apache-tomcat-7.0.62 \ solr. The directory structure is as follows: 6. Open these five folders, set solrconfig In the conf folder under these five folders. in the xml file
 1   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar" /> 2  3   <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" /> 4   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" /> 5  6   <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" /> 7   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" /> 8  9   <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />10   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />11 12   <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />13   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
To:
 1   <lib dir="../../dist/" regex="solr-dataimporthandler-.*\.jar" /> 2  3   <lib dir="../../contrib/extraction/lib" regex=".*\.jar" /> 4   <lib dir="../../dist/" regex="solr-cell-\d.*\.jar" /> 5  6   <lib dir="../../contrib/clustering/lib/" regex=".*\.jar" /> 7   <lib dir="../../dist/" regex="solr-clustering-\d.*\.jar" /> 8  9   <lib dir="../../contrib/langid/lib/" regex=".*\.jar" />10   <lib dir="../../dist/" regex="solr-langid-\d.*\.jar" />11 12   <lib dir="../../contrib/velocity/lib" regex=".*\.jar" />13   <lib dir="../../dist/" regex="solr-velocity-\d.*\.jar" />

 

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.