Elasticsearch 7.2 Cluster Installation Important Node Records

Posted by s_ainley87 on Tue, 23 Jul 2019 12:34:21 +0200

1. Configuration file

[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. Installation Command

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

3. Start command

/etc/init.d/elasticsearch start

4. Description of parameters

cluster.name: xing-application
 The default cluster name for configuring es is elastic search, which automatically discovers es in the same segment. If there are multiple clusters in the same segment, this attribute can be used to distinguish different clusters.
node.name: node-1
 Node name, which by default randomly specifies a name list in the name.txt file in the config folder in the jar package of es, with many interesting names added by authors.
path.data: /var/lib/elasticsearch
 Set the storage path of index data, default is the data folder under the es root directory, you can set up multiple storage paths, separated by commas.
path.logs: /var/log/elasticsearch
 Set the storage path of the log file. The default is the logs folder in the es root directory.
network.host: 0.0.0.0
 Set the bound ip address, which can be ipv4 or ipv6
cluster.initial_master_nodes: ["node-1"]
Parameters set the host name or ip address of a series of nodes that meet the requirements of the primary node to boot the cluster. Manually specify the name or ip of all nodes that can be mater, and these configurations will be computed in the first election.
http.cors.enabled: true
 If HTTP ports are enabled, this property specifies whether cross-domain REST requests are allowed.
http.cors.allow-origin: "*"
If the value of http.cors.enabled is true, this property specifies where REST requests are allowed to come from.
discovery.seed_hosts: ["192.168.56.14", "192.168.56.15", "192.168.56.16"]
Configure the host address of the cluster. After configuring, the cluster hosts can be found automatically.

5. The ultimate effect of cluster

Topics: Big Data ElasticSearch network RPM REST