Install Elasticsearch on Linux or Mac OS X

Manual or Brew installation

Install JAVA

You need JAVA, start by installing/updating Java. If you plan to do development with Elasticsearch, get the JDK, otherwise, the JRE will be sufficient. Official downloads page.

Download JAVA

Install Elasticsearch with tar.gz

Follow this link and click on TAR

Elasticsearch download page

Unarchivate and run ES :

tar -xzvf elasticsearch-6.2.4.tar.gz
cd elasticsearch-6.2.4

Install with apt-get on Linux

Import the public key with (you should use sudo to do all these commands) and create a list file for Elasticsearch

wget -qO - | apt-key add -echo "deb stable main" | tee -a /etc/apt/sources.list.d/elk.list

Update apt-get and run the installation process

apt-get update
apt-get install -y elasticsearch

Install Elasticsearch with Homebrew on Mac OS X

First of all, install Homebrew. Mac os x users should be familiar with it (brew). Run this command in terminal :

/usr/bin/ruby -e "$(curl -fsSL"
Homebrew main page

Now we can use brew command in terminal to install ES :

brew update
brew install elasticsearch

In this case to run ES enter the command :


Check that ES work

by default, ES works on . So to check ES work without any errors run this command in terminal :


You should see the default answer with version

curl response

Or simply open this address in your navigator : in navigator


Now you can work with elasticsearch on your localhost! If you have any questions please feel free to contact me. I will be glad to answer.

By the way, you can take a look on the ElasticSearch Basics article.

LinkedIn, Twitter, Google+,,

Senior web developer, architect, cryptocurrencies trader,

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store