当前位置:   article > 正文

Elasticsearch7.7.0搭建并集成IK分词器_es7.7 ik

es7.7 ik

1、下载,解压安装

https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-7-0
rpm --install elasticsearch-7.7.0-x86_64.rpm

2、添加systemd

systemctl daemon-reload
systemctl enable elasticsearch.service

3、修改配置/etc/elasticsearch/elasticsearch.yml

cluster.name: sjzy-es
node.name: node18
path.data: /bigdata/es/data1,/bigdata/es/data2,/bigdata/es/data3,/bigdata/es/data4,/bigdata/es/data5,/bigdata/es/data
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
discovery.seed_hosts: [“node18”,“node19”,“node20”,“node21”,“node22”,“node23”,“node24”,“node2
5”,“node26”,“node27”,“node28”,“node29”]
cluster.initial_master_nodes: [“node18”, “node19”, “node20”]

4、修改配置/etc/elasticsearch/jvm.options

根据实际情况设置内存
-Xms64g
-Xmx64g

5、修改配置/usr/lib/systemd/system/elasticsearch.service

否则报错内存锁定
[Service]下添加
LimitMEMLOCK=infinity

6、给数据目录赋权限

chmod -R 777 /bigdata/es

7、增加跨域访问,方便header查看

http.cors.enabled: true
http.cors.allow-origin: “*”

8、启动ES

systemctl start elasticsearch.service

9、集成IK分词器

(1)下载对应版本IK
https://github.com/medcl/elasticsearch-analysis-ik
(2)到指定目下解压为ik目录
cd /usr/share/elasticsearch/plugins
unzip -d ik elasticsearch-analysis-ik-7.7.0.zip
(3)重启es

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/325626
推荐阅读
相关标签
  

闽ICP备14008679号