DEV Community

loading...
Elastic

Downloading Elasticsearch and Kibana(macOS/Linux and Windows)

lisahjung profile image Lisa ・Updated on ・12 min read

Elastic Stack consists of Elasticsearch, Kibana, Beats, and Logstash.

Together, the Elastic Stack allows you to take data from any source, in any format, then search, analyze, and visualize it in real time.

Since the beginning, Elastic Stack has been free and open!

This blog will walk you through how you can download and run Elasticsearch and Kibana locally on Linux, macOS, or Windows.

The following links will take you to the download pages for Elasticsearch and Kibana.

The directions for macOS/Linux and Windows are slightly different. Directions for these operatings systems are shown below.

If you want more in depth overview of Elasticsearch and Kibana, check out my blog on Beginner's guide to Elasticsearch.

For macOS and Linux

Elasticsearch

Step 1: Download Elasticsearch

Go to the Elasticsearch download link.

Select the download option for your operating system(green box).

Download ES

Step 2: Relocate the downloaded Elasticsearch and extract it

Where you relocate Elasticsearch is up to you but for this tutorial, I am moving it to the desktop.

Once Elasticsearch is downloaded(orange box), control-click on Elasticsearch and click on show in folder.

Relocate the file

Select Elasticsearch(orange box) and move it to the desktop(green box).

Move to download

Go to the desktop and unzip Elasticsearch by double clicking on it(orange box). Once Elasticsearch is unzipped, you will see a blue folder named Elasticsearch on your desktop.

Unzip the file

Step 3: Start the Elasticsearch server and ensure that everything is working properly

By using the command line, we will locate the unzipped Elasticsearch folder in the desktop and run the Elasticsearch server!

Open up a terminal of your choice. From your home directory, copy and paste the following command into your terminal to get to the Desktop.

# In the terminal of your choice 
cd Desktop
Enter fullscreen mode Exit fullscreen mode

Run the ls command in your terminal to check the name of your unzipped Elasticsearch folder(orange box) located in your Desktop.

# In the terminal
ls
Enter fullscreen mode Exit fullscreen mode

Find ES on Desktop (2)

Change into the unzipped Elasticsearch directory by running the following command.

# In the terminal
# A new version of Elasticsearch may have been released by the time you download Elasticsearch. 
#Therefore, the version of your download may differ from what is shown below(7.10.0). 
#Please make sure you cd into the Elasticsearch directory shown when using the ls command from the previous step.  

cd elasticsearch-7.10.0
Enter fullscreen mode Exit fullscreen mode

You will see that you are now in the elasticsearch directory(orange box).

CD into elasticsearch

In the terminal, run the following command.

# In the terminal
bin/elasticsearch
Enter fullscreen mode Exit fullscreen mode

You will see the cursor blinking for a while before Elasticsearch server starts running!
Run ES

Step 4: Send a cURL command to the Elasticsearch server to make sure that Elasticsearch is up and running

A REST API is used to send requests to the Elasticsearch server. These requests are sent to the endpoint http://localhost:9200.

We will use a cURL command to check whether the request is received by Elasticsearch server.

Open up a NEW terminal.

In the home directory of the new terminal, run the following command.

# In the new terminal
curl http://localhost:9200
Enter fullscreen mode Exit fullscreen mode

curl command

When you run the command(orange box), you will see the following JSON object displayed in your terminal(green box). If you see this JSON object, that means everything is working correctly and Elasticsearch has been successfully installed.

Leave these two terminals open to keep the Elasticsearch server running.

Kibana

Downloading Kibana is very similar to downloading Elasticsearch.

Step 1: Download Kibana

Kibana is a web interface for Elasticsearch. Kibana ships with its backend server that communicates with Elasticsearch.

Go to the Kibana download link.

In the region highlighted with a red box, select the download option for your operating system.

Alt Text

You will see that a zip file has been downloaded.

Step 2: Relocate the downloaded Kibana and extract it

Where you relocate Kibana is up to you but for this tutorial, I am moving it to the desktop.

Once Kibana is downloaded(orange box), control-click on Kibana and click on show in folder.
download Kibana

Select the downloaded Kibana(orange box) and move it to the desktop(green box).
relocate kibana

Go to the desktop and unzip Kibana by double clicking on it(orange box). Once Kibana is unzipped, you will see a blue folder named Kibana on your desktop.

unzip kibana

Step 3: Run Kibana and ensure that everything is working properly

By using the command line, we will locate the unzipped Kibana folder in the desktop and run the Kibana server!

Open up a new terminal. From your home directory, copy and paste the following command into your terminal to get to the Desktop.

# In a new terminal
cd Desktop
Enter fullscreen mode Exit fullscreen mode

Run the ls command in your terminal to check the name of your unzipped Kibana folder(orange box) located in your Desktop.

# In the terminal
ls
Enter fullscreen mode Exit fullscreen mode

cd into Kibana (1)

Change into the unzipped Kibana directory.

# In the terminal
# By the time you download Kibana, a new version of Kibana may have been released. 
# Therefore, the version of your download may differ from what is shown below(7.10.0-darwin-x86_64). 
# Please make sure you cd into the Kibana directory shown when using the ls command from the previous step.  

cd kibana-7.10.0-darwin-x86_64
Enter fullscreen mode Exit fullscreen mode

You will see that you are now in the Kibana directory(orange box).

Kibana directory

In the terminal, run the following command.

# In the terminal
bin/kibana 
Enter fullscreen mode Exit fullscreen mode

You will see the cursor blinking for a while before you see Kibana running!

Kibana running

When you see the following message that the Server is running at http://localhost:5601 in your terminal, you are ready to work with the Kibana interface.

Kibanna server running

Open up a browser and go to http://localhost:5601.

You will see the following displayed on the browser.

Alt Text

If Kibana does not load on your browser...

If you are having trouble getting Kibana to load, try restarting your Elasticsearch server. 
Go to the terminal used for your Elasticserach server. 
Press control + c. Then, run bin/elasticsearch in the same terminal. 

Go back to your terminal that is running Kibana. 
Run control + c in the command prompt terminal. 
Then, run bin/kibana in the terminal. Go to http://localhost:5601 on your browser. 
Enter fullscreen mode Exit fullscreen mode

All right let's get back to the Kibana browser.

Alt Text

Click on the menu option(red box) to display a drop down menu. Scroll down to management section and click on Dev Tools option(green box).

You will see the following interface here where you can send search queries to Elasticsearch!

Alt Text

Congrats. You have successfully downloaded and ran Elasticsearch and Kibana on your macOS/Linux!

Step 4: Start exploring what you can do with Elasticsearch and Kibana

The step by step guide is covered in my Beginner's Crash Course to Elastic Stack Series.

Part 1
This workshop will show you how you can perform CRUD(Create, Read, Update, and Delete) operations with Elasticsearch and Kibana.

Part 1 GitHub repo contains:

  • the video recording of the workshop. Timestamp 25:03 will take you directly to the CRUD operations section.
  • all the requests needed to perform CRUD operations with Elasticsearch and Kibana.

Part 2
This workshop will show you how you can send search queries from Kibana to Elasticsearch and how you can finetune the relevance of your search results.

Part 2 GitHub repo contains the video recording of this workshops as well as all the queries and aggregations requests covered during the workshop.

The following timestamps mark the topics you may want to explore after setting up Elasticsearch and Kibana:

  • How to add data into Elasticsearch 18:58
  • Queries and Aggregations used for search 21:56​
  • Queries used to finetune Precision or Recall 33:33

There you have it. Now, go explore what you can do!

image

For Windows

Elasticsearch

Step 1: Download Elasticsearch

Go to the Elasticsearch download link.

In the region highlighted with a green box, select the download option for Windows.

Alt Text

You will see that a zip folder has been downloaded(orange box).

Step 2: Relocate the downloaded Elasticsearch and extract it

Where you relocate this file is up to you but for this tutorial, I have created a folder called Elastic_Stack in my Windows(C:) drive.

Move the downloaded file to Elastic_Stack folder.

Alt Text

Right click on the folder to display pop up options and click on extract all option. Once the folder has been extracted, double click on the folder. You will see the following displayed on your screen.

Alt Text

Double click on the folder.

Alt Text

Click on bin folder(red box).

Alt Text

Click on the region highlighted with a green box. It should reveal the file path to the bin folder. Copy this address. We will be using it in the next step.

Step 3: Start the Elasticsearch server and ensure that everything is working properly

Alt Text

Search for the Command Prompt App in the search bar(purple box) and click on run as administrator option(red box).

In the Command Prompt App terminal, change into the bin directory(cd) by providing the file path to the bin folder. This is the file path you have copied in the previous step.

# In the command prompt terminal

cd filepath to bin folder in Elasticsearch
Enter fullscreen mode Exit fullscreen mode

Alt Text

Red box highlights the command we have used to change to the bin directory.

When you press enter, you will see that you have changed into the bin directory(blue box).

In the terminal, run the following command.

# In the command prompt terminal

elasticsearch.bat
Enter fullscreen mode Exit fullscreen mode

You will see the cursor blinking for a while before Elasticsearch server starts running!

Alt Text

You will see that Elasticsearch server is running on localhost at port 9200(red box).

A REST API is used to send a request to the Elasticsearch server. The request is sent to the endpoint http://localhost:9200.

We will use a cURL command to check whether the request is received by Elasticsearch server.

Open up a new command prompt window(red box).

Alt Text

In the new terminal, run the following command.

# In new command prompt terminal

curl http://localhost:9200
Enter fullscreen mode Exit fullscreen mode

Alt Text

When you run the command(white box), you will see the following JSON object displayed in your terminal(blue box). That means everything is working correctly and Elasticsearch has been successfully installed.

Leave these terminals open to keep the Elasticsearch server running.

Kibana

Installing Kibana is very similar to installing Elasticsearch.

Step 1: Download Kibana

Kibana is a web interface for Elasticsearch. Kibana ships with its backend server that communicates with Elasticsearch.

Go to the Kibana download link.

In the region highlighted with a red box, select the download option for Windows.

Alt Text

You will see that a zip folder has been downloaded.

Step 2: Relocate the downloaded Kibana and extract it

Where you relocate this folder is up to you but for this tutorial, I have created a folder called Elastic_Stack in my Windows(C:) drive.

Move the downloaded folder to Elastic_Stack folder.
Alt Text

Right click on the folderto display options and click on extract all option. Once the folder has been extracted, double click on the folder.

Alt Text

Click on the bin folder(red box).

Alt Text

Click on the region highlighted with a green box. It should reveal the file path to the bin folder. Copy this address. We will be using it in the next step.

Step 3: Run Kibana and ensure that everything is working properly

First, go back to the command prompt window that is running the Elasticsearch server. Make sure it is still running and it is not displaying any error messages.

Open up a new command prompt window.

In the Command Prompt App terminal, change into the bin directory(cd) of Kibana by providing the file path to the bin folder. This is the path you have copied from the bin folder in the previous step.

# In the command prompt terminal

cd filepath to bin folder in Kibana 
Enter fullscreen mode Exit fullscreen mode

Alt Text

The command has been highlighted with a red box.

When you press enter, you will see that you have changed into the bin directory(blue box).

In the terminal, run the following command.

# In the command prompt terminal

kibana.bat
Enter fullscreen mode Exit fullscreen mode

You will see the cursor blinking for a while before you see Kibana running!
When you see the message http server running at http://localhost:5601 in your terminal, you are ready to work with the Kibana interface.

Alt Text

Open up a browser and go to http://localhost:5601.

You will see the following displayed on the browser.

Alt Text

If Kibana does not load on your browser...

If you are having trouble getting Kibana to load, try restarting your Elasticsearch server. 
Go to the terminal used for your Elasticserach server. 
Press control + c. Then, run elasticsearch.bat in the same terminal. 

Go back to your terminal that is running Kibana.
Run control + c in the command prompt terminal. 
Then, run kibana.bat in the terminal. 
Go to http://localhost:5601 on your browser. 
Enter fullscreen mode Exit fullscreen mode

All right let's get back to the Kibana browser.

Alt Text

Click on the menu option(red box) to display a drop down menu. Scroll down to management section and click on Dev Tools option(green box).

You will see the following interface here where you can send search queries to Elasticsearch!

Alt Text

Congrats. You have successfully downloaded and ran Elasticsearch and Kibana on Windows!

Step 4: Start exploring what you can do with Elasticsearch and Kibana

The step by step guide is covered in my Beginner's Crash Course to Elastic Stack Series.

Part 1
This workshop will show you how you can perform CRUD(Create, Read, Update, and Delete) operations with Elasticsearch and Kibana.

Part 1 GitHub repo contains:

  • the video recording of the workshop. Timestamp 25:03 will take you directly to the CRUD operations section.
  • all the requests needed to perform CRUD operations with Elasticsearch and Kibana.

Part 2
This workshop will show you how you can send search queries from Kibana to Elasticsearch and how you can finetune the relevance of your search results.

Part 2 GitHub repo contains the video recording of this workshops as well as all the queries and aggregations requests covered during the workshop.

The following timestamps mark the topics you may want to explore after setting up Elasticsearch and Kibana:

  • How to add data into Elasticsearch 18:58
  • Queries and Aggregations used for search 21:56​
  • Queries used to finetune Precision or Recall 33:33

There you have it. Now, go explore what you can do!

image

Discussion (0)

pic
Editor guide