码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2019-07-23 18:58:16      阅读:365      评论:0      收藏:0      [点我收藏+]

标签:之间   mamicode   重要   存储   ica   network   initial   mic   gre   

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集群安装重要节点记录

标签:之间   mamicode   重要   存储   ica   network   initial   mic   gre   

原文地址:https://blog.51cto.com/860143/2422797

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!