Solr learning Summary (2) installation and configuration of Solr, solr Summary

Source: Internet
Author: User
Tags solr

Solr learning Summary (2) installation and configuration of Solr, solr Summary

Next, I will summarize the installation and configuration of Solr.

 

  1. Prepare

1. install java 8 and tomcat 9. The installation of java and tomcat is not repeated here. Note that these two versions are compatible. It seems that Java 8 does not support Tomcat 7 or earlier versions.

2. Download The solr installation package. The latest version is 5.3.1.

: Http://www.apache.org/dyn/closer.lua/lucene/solr/5.3.1

 

  2. Installation

1. decompress the solr package, and copy the webapp folder under the solr-5.3.1 \ server \ solr-webap folder to the Tomcat \ webapps \ directory, and change it to solr

 

2. Copy all the jar files in the solr-5.3.0 \ server \ lib \ ext in the solr compressed package to the Tomcat \ webapps \ solr \ WEB-INF \ lib directory

 

3. Copy the solr-5.3.0/server/resources/log4j. properties in the solr package to the Tomcat \ webapps \ solr \ WEB-INF \ lib directory

 

4. Copy the solr-5.3.0/server/solr directory in the solr package to the Directory D: \ solr_home

5. Open web. xml under Tomcat/webapps/solr/WEB-INF and add the following configuration content (the content is commented out in the Initial State ):

<env-entry>       <env-entry-name>solr/home</env-entry-name>       <env-entry-value>D:/solr_home</env-entry-value>       <env-entry-type>java.lang.String</env-entry-type></env-entry>

Change the content in <env-entry-value> to your solrhome path. Here is D:/solr_home.

This configuration mainly establishes the relationship between tomcat and solr. It enables tomcat to find the solr directory you configured.

 

6. Restart tomcat and enter http: // localhost: 8080/solr in the browser to display the Solr management interface.

 

Note: At the beginning, I was unable to access the http: // localhost: 8080/solr/page. The following exception occurs:

Solution: copy the jar package in the dist folder decompressed by solr and the jar package under contrib \ velocity \ lib to the Tomcat \ webapps \ solr \ WEB-INF \ lib directory and then create the lib directory..

 

7. configure collection. In the D: \ solr_home directory, create a directory named mycore1 and copy all files under D: \ solr_home \ configsets \ basic_configs \ conf to D: \ solr_home \ mycore1 \ conf

 

8. In the D: \ solr_home directory, create the file core. properties and edit the file.

name= mycore1

9. Visit the http: // localhost: 8080/solr page. Check the core Admin and 'mycore1 '.

 

Here solr is basically installed successfully.

 

 

Related Article

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.