Installing Elasticsearch and Kibana on MacOS
This tutorial covers the steps to install Elasticsearch and Kibana on MacOS.

Elasticsearch is a full-text search engine, allowing you to find matches from very large datasets.
Kibana is a UI tool that sits on top of ElasticStack, allowing you to visualize data and run queries.
Pre-Requisites
Before we can install Elasticsearch and Kibana, we need Homebrew and Java.
Open a new terminal window by using Command + Space to open Spotlight:

Then start typing “Terminal” and hit Enter:

To install Homebrew, run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

More information can be found from the Homebrew website https://brew.sh/
The next step is to install Java JDK.
You can see if this is already installed by running the following command:
$ /usr/libexec/java_home -V

If the JDK is not installed, use the following Homebrew command:
$ brew cask install java
Installing Elasticsearch
To install Elasticsearch’s most recent default distribution, run the following Homebrew command:
$ brew cask install elasticsearch

Once the installation is completed, run the following command to start Elasticsearch on the default port 9200:
$ brew services start elasticsearch

Then a browser visit localhost:9200 and confirm you see the message “You Know, for Search”

Installing Kibana
To install Kibana’s most recent default distribution, run the following Homebrew command:
$ brew cask install kibana

Once installed, visit Kibana on the default port 5601.
Then click the “Try our sample data” button.

On the next page, click the “Add data” button under “Sample e-Commerce Orders”

Now click the icon in the top left-hand corner.
In the menu, select “Dev Tools”:

Use the following command to perform a health check:
GET /_cat/health?v

To add data, use the PUT command.
For example, if I wanted to update the name at Id 1 in the customer data, I’d use the following command to replace the resource:
PUT /customer/_doc/1
{
"name": "George Marklow"
}

To view my name that I updated in the customer records, I’d use the GET command as follows:
GET /customer/_doc/1
