Prior to learning Solr, the enthusiastic download from the official website to the latest version of solr5.3.0, and then a lot of problems in the post-deployment. First of all, 4.0 to 5.0 is a large version of the update, the download of the file structure of the compressed package has changed a lot, resulting in a lot of online about SOLR low version of the tutorial is not instructive (of course, accessibility to the original document of the Great God ignored). This is good to say, the most ridiculous is that 5.0 of the changes led to the Chinese word breaker support on the issue, I use IK Analyzer, in 5.0 to deploy a variety of problems, no temper, step back to the sky, I obediently downloaded to the last version of solr4.0: solr4.10.4. As for the deployment of the new version of the problem, or for those who do not change the source of the great God it ... This article describes how to deploy Solr4.10.4 under Tomcat.
- Download SOLR and Tomcat
Download SOLR 4.10.4 Version: http://www.apache.org/dyn/closer.lua/lucene/solr/4.10.4
Download Tomcat (6 or later) and download the 32-bit or 64-bit version according to the system: http://tomcat.apache.org/
After downloading, unzip, location optional. Here the default is configured Jdk,tomcat is in a bootable state, and the configuration of Tomcat about the JDK is not the content of this article.
2. Copy the Solr-4.10.0\example\webapps\solr.war to the Apache-tomcat\webapps\ directory. You can then extract the file directly with the decompression software, or start Tomcat,tomcat will automatically unzip the. war file, and then close Tomcat and delete Solr.war. A (decompressed) Solr folder is created under the WebApps folder
3. Create new D:\data directory (directory location optional), 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 to
<dataDir>${solr.data.dir:D:/data/solr/collection1/data}</dataDir>
5. Modify the 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> -
Revision changed to
<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: Solr-4.10.0\example\lib\ext jar package into Apache-tomcat\webapps\solr\web-inf\lib
7. Under Apache-tomcat\webapps\solr\web-inf, create the file classes folder,
Copy: Solr-4.10.0\example\resources\log4j.properties to: Apache-tomcat\webapps\solr\web-inf\classes folder
8. Launch the Tomcat access: HTTP://LOCALHOST:8080/SOLR
Tomcat Deployment Solr4.10.4