Elasticsearch5.5 多机集群配置和x-pack安装配置

时间:2022-01-10 15:08:30

x-pack安装配置

https://www.elastic.co/guide/en/elasticsearch/reference/current/installing-xpack-es.html

1、安装

cd /usr/share/elasticsearch
sudo bin/elasticsearch-plugin install x-pack

2、配置/etc/elasticsearch/elasticsearch.yml

action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*

备注:kibana也需要安装x-pack,用户账号信息在kibana页面设置。

多机集群配置

master节点主机 10.10.83.163,配置/etc/elasticsearch/elasticsearch.yml

cluster.name: shhnwangjian
node.name: 10.10.83.163
network.host: 0.0.0.0
http.port: 9200 bootstrap.memory_lock: false
bootstrap.system_call_filter: false action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*,.ml* http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["10.10.83.163"]

slave节主机10.10.83.162

cluster.name: shhnwangjian
node.name: 10.10.83.162
network.host: 0.0.0.0
http.port: 9200 bootstrap.memory_lock: false
bootstrap.system_call_filter: false action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*,.ml* http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization node.master: false
node.data: true
discovery.zen.ping.unicast.hosts: ["10.10.83.163"]

先启动master节点程序,后启动slave节点程序。

Elasticsearch5.5 多机集群配置和x-pack安装配置

Elasticsearch5.5 多机集群配置和x-pack安装配置