Elasticsearch 7.2集群安装重要节点记录

1、配置文件

[root@es1 ~]# grep '^[a-zA-Z]'  /etc/elasticsearch/elasticsearch.yml
cluster.name: xing-application
node.name: node-1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
cluster.initial_master_nodes: ["node-1"]
http.cors.enabled: true
http.cors.allow-origin: "*"
discovery.seed_hosts: ["192.168.56.14", "192.168.56.15", "192.168.56.16"]
[root@es1 ~]#
[root@es2 ~]#  grep '^[a-zA-Z]'  /etc/elasticsearch/elasticsearch.yml
cluster.name: xing-application
node.name: node-2
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
cluster.initial_master_nodes: ["node-1"]
http.cors.enabled: true
http.cors.allow-origin: "*"
discovery.seed_hosts: ["192.168.56.14", "192.168.56.15", "192.168.56.16"]
[root@es2 ~]# 
[root@es3 ~]#  grep '^[a-zA-Z]'  /etc/elasticsearch/elasticsearch.yml
cluster.name: xing-application
node.name: node-3
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
cluster.initial_master_nodes: ["node-1"]
http.cors.enabled: true
http.cors.allow-origin: "*"
discovery.seed_hosts: ["192.168.56.14", "192.168.56.15", "192.168.56.16"]
[root@es3 ~]# 

2、安装命令

yum -y localinstall kibana-7.2.0-x86_64.rpm  elasticsearch-7.2.0-x86_64.rpm 

3、启动命令

/etc/init.d/elasticsearch start

4、参数说明

cluster.name: xing-application
配置es的集群名称,默认是elasticsearch,es会自动发现在同一网段下的es,如果在同一网段下有多个集群,就可以用这个属性来区分不同的集群。
node.name: node-1
节点名,默认随机指定一个name列表中名字,该列表在es的jar包中config文件夹里name.txt文件中,其中有很多作者添加的有趣名字。
path.data: /var/lib/elasticsearch
设置索引数据的存储路径,默认是es根目录下的data文件夹,可以设置多个存储路径,用逗号隔开。
path.logs: /var/log/elasticsearch
设置日志文件的存储路径,默认是es根目录下的logs文件夹
network.host: 0.0.0.0
设置绑定的ip地址,可以是ipv4或ipv6的
cluster.initial_master_nodes: ["node-1"]
参数设置一系列符合主节点条件的节点的主机名或 IP 地址来引导启动集群。手动指定可以成为 mater 的所有节点的 name 或者 ip,这些配置将会在第一次选举中进行计算
http.cors.enabled: true
如果启用了 HTTP 端口,那么此属性会指定是否允许跨域 REST 请求。
http.cors.allow-origin: "*"
如果 http.cors.enabled 的值为 true,那么该属性会指定允许 REST 请求来自何处。
discovery.seed_hosts: ["192.168.56.14", "192.168.56.15", "192.168.56.16"]
配置集群的主机地址,配置之后集群的主机之间可以自动发现

5、集群最终效果

Elasticsearch 7.2集群安装重要节点记录

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值