ElasticSearch安装部署及常见文件解决

ElasticSearch下载

https://www.elastic.co/cn/downloads/elasticsearch

Kibana下载地址

https://www.elastic.co/downloads/kibana

Elasticsearch与Kibana的版本需要一致

1、创建用户:elasticsearch

[root@iZbp1bb2egi7w0ueys548pZ bin]# adduser elasticsearch

2、创建用户密码,需要输入两次

[root@iZbp1bb2egi7w0ueys548pZ bin]# passwd elasticsearch

3、将对应的文件夹权限赋给该用户

[root@iZbp1bb2egi7w0ueys548pZ local]# chown -R elasticsearch elasticsearch-6.0.0

4、切换至elasticsearch用户

[root@iZbp1bb2egi7w0ueys548pZ etc]# su elasticsearch

5、进入启动目录启动 /usr/local/elasticsearch-6.0.0/bin  使用后台启动方式:./elasticsearch -d

[elasticsearch@vmt10003 bin]$ ./elasticsearch -d

遇见问题

1.启动后访问ip:9200没有显示json,Failed connect to 10.132.131.51:9200; Connection refused  解决:

  修改config/elasticsearch.yml文件,添加

  network.host: 0.0.0.0

2.ERROR: [5] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max number of threads [1024] for user [es] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[4]:  failed to install; check the logs and fix your configuration or disable system call filters at your own risk
[5]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts

切换root用户
vi /etc/security/limits.conf

在倒数第二行添加
 
* soft nofile 65536
* hard nofile 65536

vi /etc/sysctl.conf 添加

vm.max_map_count=655360

保存后执行
sysctl -p

vi /etc/security/limits.d/90-nproc.conf(不同机器可能数字不同)
修改为
*          soft    nproc     4096

修改elasticsearch.yml取消注释保留一个节点,master应该是主机名,有就修改没有就添加
cluster.initial_master_nodes: ["master"]

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

启动,访问http://master:9200

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值