ElasticSearch安装及运行的坑

ElasticSearch安装及运行的坑

一、确认centos系统是为64位的,x86的不可以安装

1. 下载elasticsearch包

2. 用 tar -zxvf 解压包

3. 增加一个elk用户,elasticsearch7不可用root用户运行

4. 新建用户必须要用 chown -R 用户名 文件夹:进行权限分配

二、配置实现外网访问

三、处理三个系统配置

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

  每个进程最大同时打开文件数太小,可通过下面2个命令查看当前数量

ulimit -Hn ulimit -Sn

  修改/etc/security/limits.conf文件,增加配置,用户退出后重新登录生效

* soft nofile 65536 * hard nofile 65536

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

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

vi /etc/sysctl.conf

sysctl -p

  执行命令sysctl -p生效

正确的limits.conf

四、处理bootstrap checks failed问题

[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

这时候继续编辑elasticsearch.yml文件,将 #cluster.initial_master_nodes: ["node-1", "node-2"] 修改为 cluster.initial_master_nodes: ["node-1"],

另一种解决办法:

报错:ERROR: bootstrap checks failed

解决:在elasticsearch.yml中配置bootstrap.system_call_filter为false,要在Memory下面:

bootstrap.memory_lock: false

bootstrap.system_call_filter: false

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值