ElasticSearch – How to Install ElasticSearch ?

Published on March 5, 2016 by abundantcode

Filed under Elastic Search

Last modified March 5, 2016

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 1993 times

Problem Statement

You need to download , install and Elastic Search on Windows and Mac OS X machines.


You can download ElasticSearch which is available in various formats like Zip , Tar.gz from https://www.elastic.co/downloads/elasticsearch .

The installation is pretty simple and infact you dont need to do  anything special to install ElasticSearch on your machine.

You need to extract or uncompress the file.

Note : You need to ensure that you are running the latest version of the JDK on your machine and the class path is configured on your System Environment variables.

How to run ElasticSearch on Windows machine ?

To run ElasticSearch on Windows PC , run the elasticsearch.bat file from the bin folder under the extracted folder path. This will start ElasticSearch in the foreground using the console.

How to shutdown ElasticSearch in Windows ?

To shutdown ElasticSearch in Windows , press Ctrl+C shortcut key in the command window or close the command window.

If you dont have the JAVA_HOME environment variable set , you will be prompted with a message "JAVA_HOME environment variable must be set!".

How to run ElasticSearch on Mac OSX machine ?

If you want to run ElasticSearch on Mac OS X , just run the elasticsearch shell script from the bin folder.


Testing Your ElasticSearch

You can test your ElasticSearch by following the below steps
1. Launch the Web browser (Eg : Microsoft Edge , Google Chrome etc).
2. Enter the following URL

3. You should immediately see a response like this

  "name" : "Union Jack",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "2.2.0",
    "build_hash" : "8ff36d139e16f8720f2947ef62c8167a888992fe",
    "build_timestamp" : "2016-01-27T13:32:39Z",
    "build_snapshot" : false,
    "lucene_version" : "5.4.1"
  "tagline" : "You Know, for Search"

If you are using curl , then you can use the below command as shown.

curl ‘http://localhost:9200/?pretty’

Now that your Elasticsearch cluster is up and running, you can start your adventure on ElasticSearch :).

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment


You might be Interested in these Posts

How to get the Number of Elements in an Array in C# ?

You can use the Length property of the array to return the number of elements in it. Note that once ...

How to get the Machine Name from a .NET Application using C# ?

You can use the MachineName property defined in the System.Environment class in order to get the Mac...

How to append an array to another in JavaScript ?

In JavaScript , you may want to append one array to another array(s) to combine their elements resul...