1, installed version and the Environment
elasticsearch version: C-6.5.4
elasticsearch directory: / opt / elasticsearch /
centos7 server memory requirements at least 8G.
2, a cluster of three servers
172.17.115.124 master
172.17.115.125 master data
172.17.115.126 master data
3, create an account to start elasticsearch
useradd newUser
passwd newUser
4, create data and log directory
mkdir -p /opt/elasticsearch/data/data/
mkdir -p /opt/elasticsearch/data/logs/
Authorize
chown -R newUser:newUser /opt
5, the configuration modification elasticsearch
1) 172.17.115.124 configuration information:
cluster.name: my-application
node.name: node-172-17-115-124
path.data: /opt/elasticsearch/data/data
path.logs: /opt/elasticsearch/data/logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 172.17.115.124
http.port: 9200
discovery.zen.ping.unicast.hosts: ["172.17.115.125:9300","172.17.115.124:9300","172.17.115.126:9300"]
discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 3
node.master: true
node.data: false
node.ingest: false
search.remote.connect: false
http.cors.enabled: true
http.cors.allow-origin: "*"
2) 172.17.115.125 configuration information:
cluster.name: my-application
node.name: node-172-17-115-125
path.data: /opt/elasticsearch/data/data
path.logs: /opt/elasticsearch/data//logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 172.17.115.125
http.port: 9200
discovery.zen.ping.unicast.hosts: ["172.17.115.125:9300","172.17.115.124:9300","172.17.115.126:9300"]
discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 3
node.master: true
node.data: false
node.ingest: false
search.remote.connect: false
http.cors.enabled: true
http.cors.allow-origin: "*"
3) 172.17.115.126 configuration information:
cluster.name: my-application
node.name: node-172-17-115-126
path.data: /opt/elasticsearch/data/data
path.logs: /opt/elasticsearch/data/logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 172.17.115.126
http.port: 9200
discovery.zen.ping.unicast.hosts: ["172.17.115.125:9300","172.17.115.124:9300","172.17.115.126:9300"]
discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 3
node.master: true
node.data: false
node.ingest: false
search.remote.connect: false
http.cors.enabled: true
http.cors.allow-origin: "*"
6, start elasticsearch
./bin/elasticsearch
Or backgrounding
./bin/elasticsearch -d
After a successful start, with CURL whether the request to build a successful test cluster.
curl http://172.17.115.124:9200/_cat/nodes?v
Below, 172.17.115.126 master node
Description:
cluster.name value of the three machines must be the same, node.name value must be different.
7, head configuration
you _site / app.js
8, head start
# node_modules/grunt/bin/grunt server &
Backgrounding
# nohup node_modules/grunt/bin/grunt server &
See the following, i.e., a great work to high
This article is presented in the following two articles asking foundation installation instructions, any questions please read the next two articles, comments or discussion