How to install elastic-search on Mac/Linux

1. Installation example with tar

Let’s download the Elasticsearch 6.2.4 tar as follows:

curl -L -O

Then extract it as follows:

tar -xvf elasticsearch-6.2.4.tar.gz

It will then create a bunch of files and folders in your current directory. We then go into the bin directory as follows:

cd elasticsearch-6.2.4/bin

And now we are ready to start our node and single cluster:


2. Installation with Homebrew

On macOS, Elasticsearch can also be installed via Homebrew:

brew install elasticsearch