elasticsearch集群安装

3台机器elasticsearch集群
所需软件:
1.jdk8
2.elasticsearch6.3.2
3.elasticsearch-head

在安装elasticsearch之前,先安装jdk1.8。
集群规划

主机名角色备注
192.168.68.128主节点node-1
192.168.68.128从节点node-2
192.168.68.128从节点node-3

一、下载解压安装包

tar -zxvf elasticsearch-6.3.2.tar.gz -C /usr/local/modules/

二、编辑 vim elasticsearch.yml文件

cluster.name: my-application
node.name: node-1
node.master: true
network.host: 192.168.68.128

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

http.port: 9201
discovery.zen.ping.unicast.hosts: ["192.168.68.128"]
http.cors.enabled: true
http.cors.allow-origin: "*"

三、启动es会报错

[2020-10-28T04:54:00,395][INFO ][o.e.b.BootstrapChecks    ] [node-1] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: max number of threads [1024] for user [es] is too low, increase to at least [4096]
[2]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
[2020-10-28T04:54:00,411][INFO ][o.e.n.Node               ] [node-1] stopping ...
[2020-10-28T04:54:00,462][INFO ][o.e.n.Node               ] [node-1] stopped
[2020-10-28T04:54:00,462][INFO ][o.e.n.Node               ] [node-1] closing ...
[2020-10-28T04:54:00,496][INFO ][o.e.n.Node               ] [node-1] closed

解决方案
max number of threads

vim /etc/security/limits.conf

* soft nproc 65536
* hard nproc 65536
* soft nofile 65536
* hard nofile 65536

vim /etc/security/limits.d/90-nproc.conf 

soft nproc 2048

vm.max_map_count

vi /etc/sysctl.conf
vm.max_map_count=262144

保存后再执行下面命令

sysctl -p

system call filters

vim elasticsearch.yml
bootstrap.memory_lock: false
bootstrap.system_call_filter: false

四、分别启动三个elasticsearch
启动命令

./bin/elasticsearch

在这里插入图片描述

五、访问
http://192.168.68.128:9201/
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据引用内容,安装Docker上的Elasticsearch集群的步骤如下: 1. 首先,准备好环境。在vmware15上搭建CentOS 7虚拟机,并安装Docker(版本为Docker version 19.03.13)。 2. 拉取Elasticsearch的镜像。使用命令`docker pull elasticsearch:7.9.3`来拉取最新版本的Elasticsearch镜像。 3. 修改配置。根据自己的需求和环境,修改Elasticsearch的配置文件。修改完成后,重启Elasticsearch容器。 4. 生成密码。进入Elasticsearch容器,并使用命令`bin/elasticsearch-setup-passwords interactive`来生成密码。 5. 启动Metricbeat。使用命令`docker run -d --privileged=true --name=metricbeat --user=root --volume="$(pwd)/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro" --volume="/var/run/docker.sock:/var/run/docker.sock:ro" --volume="/sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro" --volume="/proc:/hostfs/proc:ro" --volume="/:/hostfs:ro" docker.elastic.co/beats/metricbeat:7.9.3`来启动Metricbeat。 以上是基于引用的内容给出的关于Docker Elasticsearch集群安装的步骤。希望对你有所帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [使用docker安装es集群](https://blog.csdn.net/xiezuozhen/article/details/129740587)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [使用docker搭建es集群](https://blog.csdn.net/frrree/article/details/120453668)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值