Linux安装Elasticsearch,Elasticsearch Analysis IK和Kibana

1.下载elasticsearch安装包

2.下载对应版本的IK包,https://github.com/medcl/elasticsearch-analysis-ik/releases

解压后放入elasticsearch 的plugins文件夹下面。

3.配置远程分词过滤

修改配置文件IKAnalyzer.cfg.xml

在IKAnalyzer.cfg.xml添加远程服务配置

<!--用户可以在这里配置远程扩展字典 -->

<entry key="remote_ext_dict">http://10.10.55.49:9088/hotword.dic</entry>

<!--用户可以在这里配置远程扩展停止词字典-->

<entry key="remote_ext_stopwords">http://10.10.55.49:9088/stopword.dic</entry>

 

修改完成后,重启es服务。

过滤词汇如果有修改,可以直接修改远程字典,es会自动同步远程字典的信息(hotword.dic 与 stopword.dic),不需要重启服务。

4.配置nginx代理

上图配置中http://10.10.55.49:9088/hotword.dic 可以配置为nginx代理。

4.1.添加自定义dic

4.2.添加nginx配置

可以根据具体情况,配置灵活的nginx代理

4.3.启动nginx

 
  1. nginx -c /home/bigdata01/projects/es_ik_dic/nginx_ik_dic.conf

5.系统设置

5.1 max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

 

修改/etc/security/limits.conf文件,增加配置,

*               soft    nofile          65536
*               hard    nofile          65536
用户退出后重新登录生效

查看命令:

ulimit -Hn

ulimit -Sn

5.2 max number of threads [3818] for user [es] is too low, increase to at least [4096]

最大线程个数太低。修改配置文件/etc/security/limits.conf,增加配置

*               soft    nproc           4096

*               hard    nproc           4096

查看命令:
ulimit -Hu
ulimit -Su

5.3 max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

修改/etc/sysctl.conf文件,增加配置vm.max_map_count=262144

执行命令sysctl -p生效

5.4 max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048]

修改 /etc/security/limits.d/90-nproc.conf

原: soft nproc 1024
改为: soft nproc 2048

启动elasticsearch。

后台启动:./elasticsearch -d 

5.5. 修改elasticsearch.yml

cluster.name: elastic

node.name: node-1

network.host: 0.0.0.0

http.port: 9200

6.下载对应版本的Kibana

修改kibana.yml

elasticsearch.url: "http://127.0.0.1:9200"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值