A, linux system installation configuration solr8

First, prepare the environment

1. Download the latest version solr, I was 8.4.0

https://lucene.apache.org/solr/downloads.html

2, download and install tomcat, my version is 9.0, used to make solr service up and running, because solr is embedded netty, unstable

3, download and install jdk1.8 or later

 

Second, install solr, create a directory solr, unzip the downloaded solr, remember, linux is tgz suffix, it is recommended decompression in window systems because of the use to which the configuration file, easy to operate in a window system

mkdir /usr/local/solr
tar -xvf solr-8.4.0.tgz

 

Third, paste the copied under /usr/local/solr/solr-8.4.0/server/solr-webapp webapp directory to download and install tomcat in good, and mv renamed solr

 

 

 

 Four, jar solr installation package of the server → ext folder, server → beginning metrics jar file, server → beginning http2 jar files are copied to tomcat → webApp → solr → WEB_INF → lib folder

 

Step five: with family, web.xml under Configuration apache-tomcat-8.0.47 → webApp → solr → WEB_INF

 

 Notes about the configuration (the purpose is to prevent tomcat 403 issues)

 

Step Six: copy the configuration file in the file server → resources solr8 installation package to apache-tomcat → webApp → solr → WEB_INF → classes folder (if no classes folder, create) arranged after ik tokenizer classes will be used

 

 

 

Step Seven: In the fifth step configuration path / usr / local / solr create what solrhome, used to store data solr

 1、把solr8安装下面的例子中的conf、core.properties文件复制到solrhome目录下的core1,core1是自己创建起名,core1就是solr的片,实例

2、同时编辑vim core.properties文件,添加name=core1

3、也要编辑conf下面的配置managed-schema、solrconfig文件

 4、solrconfig编辑如下,以后配置mysql导入数据时也会用到它

 5、managed-schema主要是配置solr域的,配置如下,在尾部新增的自定义域,其中text_ik是要配置ik中文分词器的,可以先用solr自带类型,等会再说明配置ik分词器

7、配置ik中文分词器,请参考 https://blog.csdn.net/u010634288/article/details/81634689

8、把solr8安装下面dist、contrib包也复制到solrhome目录下,这两个包是solr官方example实例用到,我们也复制吧

 

最终solrhome目录如下:

 

 3、启动tomcat,运行solr就可以看到了成功的画面了

Guess you like

Origin www.cnblogs.com/caohanren/p/12203800.html