下载地址: https://www.elastic.co/cn/downloads
cat config/jvm.options-Xms1g
-Xmx1g
推荐:如果足够的内存,也尽量不要 超过 32 GB。即每个节点内存分配不超过 32 GB。 因为它浪费了内存,降低了 CPU 的性能,还要让 GC 应对大内存。如果你想保证其安全可靠,设置堆内存为 31 GB 是一个安全的选择。
vim config/elasticsearch.yml
cluster.name: www.centoscn.vip
node.name: node-1
path.data: /opt/path/to/data
path.logs: /opt/path/to/logs
network.host: 10.10.0.252
http.port: 9200
discovery.seed_hosts: ["10.10.0.252", "10.10.0.253","10.10.0.254"]
cluster.initial_master_nodes: ["10.10.0.252", "10.10.0.253"]
mkdir -p ${ES_HOME}/data
mkdir -p ${ES_HOME}/logs
vim config/elasticsearch.yml
node.name: node-2
network.host: 10.10.0.253
cluster.initial_master_nodes: ["10.10.0.253", "10.10.0.254"]
vim config/elasticsearch.yml
node.name: node-3
network.host: 10.10.0.254
cluster.initial_master_nodes: ["10.10.0.253", "10.10.0.254"]
groupadd elasticsearch
useradd elasticsearch -g elasticsearchchown -R elasticsearch:elasticsearch ${ES_HOME}
* soft nofile 65535
* hard nofile 65535
sysctl -w vm.max_map_count=262144
su - elasticsearchcd ${ES_HOME}
nohup ./bin/elasticsearch &