First part Installation Preparation
Prepare three host nodes:
Hc11.spads 192.168.160.181
Hc12.spads 192.168.160.182
Hc13.spads 192.168.160.183
To prepare the package:
Elasticsearch-2.2.0.tar.gz
Note: Upload the above packages to each host node/opt/softwareres/directory.
Part II installation Configuration elasticsearch-2.2.0
1, each host node decompression package elasticsearch-2.2.0.tar.gz
tar–zxvf/opt/softwareres/elasticsearch-2.2.0.tar.gz–c/opt/
ll/opt/| grep elastic
2. Modify the configuration
Each host node edits the ELASTICSEARCH.YLM configuration file separately
Vim/opt/elasticsearch-2.2.0/config/elasticsearch.ylm
Note: YLM file specification:
(1) The line needs shelf write, the beginning of the row is not allowed to have spaces
(2) you need a space after the colon
Where you need to configure the following
(1) Cluster Specify the cluster name ( each host node configuration must be consistent )
Cluster.name:hc
(2) node name ( different host node configuration required )
Node.name:node-1
(3) Network specified IP address and HTTP access port
network.host:192.168.160.181 ( IP for each host node)
HTTP.PORT:9200 ( consistent with each host node )
(4) Other configuration-anti-brain crack parameters ( each host node configuration consistent )
Discovery.zen.ping.multicast.enabled:false ( turn off default multicast )
Discovery.zen.ping_timeout:120s
client.transport.ping_timeout:60s
Discovery.zen.ping.unicast.hosts: ["192.168.160.181", "192.168.160.182", "192.168.160.183"] ( limit matching host node )
(5) Add user to each host node and grant permission to switch the login user to the new user
Note: Elasticsearch does not allow root user to start, all need to add normal user to start Elasticsearch.
Useradd Bigdata
passwd Bigdata
Follow the prompts to repeat the password two times to complete the new user.
Chown–r bigdata:bigdata/opt/elasticsearch-2.2.0/
Complete the authorization.
Su Bigdata
Switch to normal user.
(6) Start Elasticsearch
Each host node executes commands
/opt/elasticsearch-2.2.0/bin/elasticsearch
Then open the browser http://hc11.spads:9200 (directly using the hostname and need to configure hosts) to view the cluster status.
Big Data ES Series--The first ElasticSearch2.2 cluster installation deployment