Linux环境安装Elasticsearch-6.4.3

在搭建环境之前首先配置好jdk环境,在此以jdk1.8为例(Elasticsearch7以上的要jdk11)

1、下载elasticsearch安装包

官方文档Download Elasticsearch | Elastic

注意:linux安装内存建议1g内存以上

2、上传elasticsearch安装包

3、解压elasticsearch

tar -zxvf elasticsearch-6.4.3.tar.gz

4、修改elasticsearch.yml

cluster.name:myes

network.host: 192.168.212.151       #自己虚拟机ip

http.port: 9200

5、不能用root账号启动,

会报错 can not run elasticsearch as root

adduser es  #新增用户

passwd es  #修改密码

chown -R es  elasticsearch-6.4.3  #给用户es赋权限

6、启动,继续报错

bootstrap checks failed max virtual memory areas vm.max_map_count [65530] is

vi /etc/sysctl.conf

在最后一行添加:vm.max_map_count=655360

然后运行sysctl -p

7、vi  /etc/security/limits.conf

在最后一行添加

* soft nofile 65536

* hard nofile 65536

* soft nproc 4096

* hard nproc 4096

重启服务器即可

8、访问elasticsearch

关闭防火墙  systemctl stop firewalld.service

9、重新启动es

sh elasticsearch -d

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值