I. Preface:
Environment :(note –> all do not specify the environment installation tutorial is playing rogue)
- centos7
- solr6.6.5
- jdk1.8
- tomcat8
I remember in SolR4 there was an outsourcing project that needed to use the retrieval function for almost a week, from Lucene to Solr installation… Today, because of the need to use solr this thing, so have to find more than n tutorials to install, a word into……
Jetty can be used as a built-in server in Solr 6.6, but tomcat was originally used in the project, so we had to integrate Tomcat, because there is a Web project that can be used in solr installation package
Ii. Installation :(in order to facilitate the screenshots, I directly use Windows, because I also installed this way before)
- Download the installation package:
Wget HTTP: / / http://mirror.bit.edu.cn/apache/lucene/solr/6.6.5/solr-6.6.5.tgzCopy the code
- Unpack the
The tar CXF/solr - 6.6.5. TGZCopy the code
-
Copy the associated JARS and files. Copy the following files to tomcat’s webapps directory and rename it solr-Web
-
Copy the following jar into the solr-web/ web-INF /lib directory
-
Copy the following jar into the solr-web/ web-INF /lib directory
-
Copy the following jar into the solr-web/ web-INF /lib directory
-
Create an index directory that you can define yourself such as solr_index and copy the following files to this directory
-
Configuring solr – web/web – INF/web. XML
<env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry-value> Configure the directory we just set (solr_index) </env-entry-value> <env-entry-type>[Java](http://lib.csdn.net/base/javaee"Java EE Repository").lang.String</env-entry-type>
</env-entry>
Copy the code
3. Operation errors and solutions
So far, our configuration has been completed, the following access to look at http://localhost:8080/solr6/server/index.html#/
- Tomcat error:
3.1. To solve errors:
- In the later version of tomcat, rfc3986 specifies which characters are allowed in the url. Go to the conf directory of tomcat and modify the last sentence in catalina.properties
Get rid of the previous comments, and instead to tomcat. Util. HTTP. Parser. HttpParser. RequestTargetAllow = | {}
- Tomcat memory is insufficient.
Of course, how much memory will be added, as you like, and later there will be time to use the basic method of Chinese word segmentation and solr. If you have thought can add group or message communication, post the starting address https://blog.csdn.net/weixin_42849915