Elasticsearch working example
As we have gone through the various capabilities of Elasticsearch in this chapter, we will now try to look at some of the main capabilities via working examples. Let's start by installing Elastic Stack.
Installation
- Download the Elastic Stack 5.x binary from the following location using the following command:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.3.0.tar.gz
- Change the directory to a user location and extract the contents of the Elastic Stack 5.x binary using the following command:
tar -zxvf ${DOWNLOAD_DIR}/elasticsearch-5.3.0.tar.gz
- Let's refer to the extracted Elasticsearch folder as
${ES_HOME}
and set it as environment variable as shown here. Append the same into the~/.bashrc
file:
export ES_HOME=<path-to-elasticsearch-folder> export PATH=$PATH:$ES_HOME/bin
- Edit the
${ES_HOME}/config/elasticsearch.yml
file with the following:
network.host : 0.0.0.0
- Make sure that the following limits are configured in
/etc/security/limits...