ES集群环境搭建
1.检查jdk,准备安装包,确定安装路径
2.创建es用户 :
adduser elasticsearch
3.修改配置文件:
vim config/elasticsearch.yml
#配置es的集群名称,默认是elasticsearch,
#es会自动发现在同一网段下的es,
# 如果在同一网段下有多个集群,就可以用这个属性来区分不同的集群。
cluster.name: cell
#
# ------------------------------------ Node ------------------------------------
node.name: node_01
node.master: true
node.data: true
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/data/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["192.168.0.1:9300","192.168.0.2:9300", "192.168.0.3:9300"]
discovery.zen.minimum_master_nodes: 2