First, Introduction
Elasticsearch is a Lucene-based search server. It provides a distributed multi-user-capable full-text search engine, based on a restful web interface. Elasticsearch is a popular enterprise-class search engine developed in Java and published as an open source under the Apache license terms. Designed for cloud computing, it can achieve real-time search, stable, reliable, fast, easy to install and use.
Second, cluster installation
1, select the specified version of the download
wget https://Download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar /elasticsearch/2.4.0/elasticsearch-2.4.0.tar.gztar -zxvf elasticsearch-2.4. 0. tar. gz
2, modify the CONFIG/ELASTICSEARCH.YML, directly at the end of the file to add the following content, such as the main node content:
# cluster configuration
# The cluster name of all nodes must be consistent cluster.name:es-true9200127.0. 0.1 # Configure the Master node's IP information Discovery.zen. Ping. unicast.hosts: ["127.0.0.1"]
3, for example, the config/elasticsearch.yml of other nodes
true Http.cors.allow " * " # cluster configuration cluster.name:es-false9205127.0. 0.1 Discovery.zen. Ping. unicast.hosts: ["127.0.0.1"]
4, Linux can not use the root user to start Elasticsearch, can create a new user, to start Bin/elasticsearch
chown -R elasticsearch.elasticsearch elasticsearch-2.4.0
Su Elasticsearch
Bin/elasticsearch
Yexiangyang
[Email protected]
Linux under elasticsearch cluster configuration