Linux搭建ElasticSearch集群

前言

这是整个ElasticSearch搭建的最后一篇文章,其实对我而言ElasticSearch在Linux上搭建集群写这篇文章意义并不大,只是为了补充这个空白而已,所以这篇文章并不会讲解很详细!前置可以先看看Linux安装ElasticSearchWindows搭建ElasticSearch集群这两篇文章,先将这个搞定,在来搞集群!这篇文章只介绍重点!

搭建

用户创建
按照Linux搭建ElasticSearch这篇文章中的创建即可

目录权限修改
将Linux搭建ElasticSearch这篇文章的ElasticSearch软件包复制三份出来!
在这里插入图片描述
对这上个文件夹中的权限按照Linux搭建ElasticSearch这篇文章中的来三次!

配置文件修改
node1

 cluster.name: my-application
 node.name: node-1
 node.master: true
 node.data: true
 http.host: 0.0.0.0
 http.port: 9201
 transport.tcp.port: 9301
 http.cors.enabled: true
 http.cors.allow-origin: "*"

node2

 cluster.name: my-application
 node.name: node-2
 node.master: true
 node.data: true
 http.host: 0.0.0.0
 http.port: 9202
 transport.tcp.port: 9302
 discovery.seed_hosts: ["localhost:9301"]
 discovery.zen.fd.ping_timeout: 1m
 discovery.zen.fd.ping_retries: 5
 http.cors.enabled: true
 http.cors.allow-origin: "*"

node3

 cluster.name: my-application
 node.name: node-3
 node.master: true
 node.data: true
 http.host: 0.0.0.0
 http.port: 9203
 transport.tcp.port: 9303
 discovery.seed_hosts: ["localhost:9301", "localhost:9302"]
 discovery.zen.fd.ping_timeout: 1m
 discovery.zen.fd.ping_retries: 5
 http.cors.enabled: true
 http.cors.allow-origin: "*"

按照node1、node2、node3的顺序启动即可

在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

程序员劝退师-TAO

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

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

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

打赏作者

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

抵扣说明:

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

余额充值