Elasticsearch6.x 安装以及一些坑

一.安装步骤

1.1 下载ElasticSearch

 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.4.tar.gz

1.2. 解压安装包

 tar -zxvf elasticsearch-6.8.4.tar.gz

二. 常见的错误以及解决方案

2.1 es 不支持 root启动,解决办法如下

添加用户组:groupadd esroot
添加用户 :useradd esroot -g esroot
设置密码: passwd 12345678
切换账户: su esroot

2.2 启动时报jvm.options的错误

vim /etc/security/limits.conf
参加参数
*               soft    nproc           4096
*               hard    nproc           4096
*               soft    nofile          65536
*               hard    nofile          65536

用root用户赋权限
chown -R 用户名:用户名 文件目录
chown -R esroot:esroot /usr/local/elastic/

2.3 页面无法访问

network.host: ip地址(注意:后要写空格,不然的话要报线程异常)

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

解决:
切换到root用户
执行命令:
sysctl -w vm.max_map_count=262144
查看结果:
sysctl -a|grep vm.max_map_count
显示:
vm.max_map_count = 262144
上述方法修改之后,如果重启虚拟机将失效,所以:
解决办法:
在   /etc/sysctl.conf文件最后添加一行
vm.max_map_count=262144

下方有免费书籍的地址,大家可以看看是否对自己有用!

今天的分享就到这里,希望对大家有所帮助

关注 Java有货领取更多资料

联系小编。微信:372787553,带您进群互相学习
左侧小编微信,右侧获取免费资料
在这里插入图片描述

技术博客:https://blog.csdn.net/weixin_38937840

免费书籍:https://github.com/Dylan-haiji/Programmer-Learning-materials

SpringCloud学习代码: https://github.com/Dylan-haiji/javayh-cloud

Redis、Mongo、Rabbitmq、Kafka学习代码: https://github.com/Dylan-haiji/javayh-middleware

AlibabaCloud学习代码:https://github.com/Dylan-haiji/javayh-cloud-nacos

SpringBoot+SpringSecurity实现自定义登录学习代码:https://github.com/Dylan-haiji/javayh-distribution

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小杨同学~

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值