Linux上搭建Elasticsearch 7.6.2 集群

Elasticsearch 7.6.2 集群搭建

1. 环境准备

2. 配置集群

  • 修改elasticsearch.yml
  • 修改过后的信息如下所示,可用以下命令进行查看(去掉了脚本中的注释)
more elasticsearch.yml | grep ^[^#]

在这里插入图片描述

  • 配置信息如下:
cluster.name: test-es-cluster
node.name: es-node1
path.data: /usr/local/elasticsearch-7.6.2/data
path.logs: /usr/local/elasticsearch-7.6.2/logs
network.host: 0.0.0.0
http.port: 9200
http.cors.enabled:  true
http.cors.allow-origin: "*"
node.master: true
node.data: true
discovery.seed_hosts: ["192.168.232.4","192.168.232.5","192.168.232.6"]
cluster.initial_master_nodes: ["es-node1"]
  • 注意:" : " 与值之间需要一个空格
  • 以上配置信息配置好之后进入bin目录下,启动Elasticsearch,然后通过浏览器访问IP+端口进行访问查看得到如下信息,到此配置成功!
    在这里插入图片描述

Logo

脑启社区是一个专注类脑智能领域的开发者社区。欢迎加入社区,共建类脑智能生态。社区为开发者提供了丰富的开源类脑工具软件、类脑算法模型及数据集、类脑知识库、类脑技术培训课程以及类脑应用案例等资源。

更多推荐