Tomcat deployment Solr4.10.4, tomcatsolr4.10.4
I learned about solr some time ago and was eager to download solr5.3.0 to the latest version from the official website. Then there were many problems during later deployment. First, version 4.0 to version 5.0 is a major version update, and the file structure of the downloaded compressed package has changed a lot. As a result, many online tutorials on earlier solr versions have no guiding significance (of course, you can read the original document without any help ). It's okay to say that the most bullshit thing is that 5.0 of the changes have caused a problem in the support of the Chinese word divider. I am using IK Analyzer, and I am not angry when I deploy various problems on 5.0, let's take a step back and download solr4.10.4 to solr4.0. As for the new version of the headquarters, leave it to the great gods who can change the source code without moving ...... This article introduces how to deploy Solr4.10.4 under tomcat.
Download solr 4.10.4: http://www.apache.org/dyn/closer.lua/lucene/solr/4.10.4
Download Tomcat (version 6 or later), you can also download 32-bit or 64-bit version based on the system: http://tomcat.apache.org/
After the download is complete, decompress the package and select the desired location. Jdk has been configured by default, and tomcat is ready to start. The jdk configuration for tomcat is not described in this article.
2. Copy solr-4.10.0 \ example \ webapps \ solr. war to the apache-tomcat \ webapps \ directory. Then you can directly decompress the file with the decompression software, or start tomcat. tomcat will automatically decompress the. war file, and then close tomcat and delete solr. war. In this case, a (decompressed) solr folder is generated under the webapps folder.
3. New D: \ data directory (directory location at will), copy: solr-4.10.0 \ example \ solr folder to D: \ data
4. Modify the following content in D: \ data \ solr \ collection1 \ conf \ solrconfig. xml:
<dataDir>${solr.data.dir:}</dataDir>
Change it
<dataDir>${solr.data.dir:D:/data/solr/collection1/data}</dataDir>
5. Modify apache-tomcat \ webapps \ solr \ WEB-INF \ web. xml
<!-- <env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry-value>/put/your/solr/home/here</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> -->
Change
<env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry-value>D:/data/solr</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry>
6. Copy: jar package under solr-4.10.0 \ example \ lib \ ext to apache-tomcat \ webapps \ solr \ WEB-INF \ lib
7. Create the file classes folder under apache-tomcat \ webapps \ solr \ WEB-INF,
Copy: solr-4.10.0 \ example \ resources \ log4j. properties to: apache-tomcat \ webapps \ solr \ WEB-INF \ classes folder
8. start tomcat access: http: // localhost: 8080/solr