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.