Elastic Search

How to Install Elasticsearch and Kibana on MacOS

“This article will clarify the process of downloading and setting up Elasticsearch and Kibana on your macOS system.”

If you need ELK on your machine, let’s dive in.

Pre-Requisites

To trail along with this post, ensure you have the following pre-requisites:

    1. Sudo or sufficient privileges to install and uninstall packages
    2. A network connection
    3. At least 4 GB Ram
    4. At least a two-core CPU.

With the above requirements met, we can proceed.

Install Elasticsearch Using Homebrew

In macOS, we can use the Homebrew package manager to install and set up Elasticsearch on our local system.

The Elasticsearch formula is published by Elastic.co, which means it contains the latest releases of Elasticsearch.

Before running the brew command, ensure you have Homebrew installed and configured on your machine.

Next, install the Elastic Homebrew repo with the command:

$ brew tap elastic/tap

 

Once we have the Elastic repository available in Homebrew packages, we can update the repositories and install Elasticsearch

$ brew install elastic/tap/elasticsearch-full

 
The command will download, install and configure the Elasticsearch package on your system.

Brew Start Elasticsearch

Once we have elasticsearch installed, we can start the service with the Homebrew service manager as shown in the command below:

$ brew services start elastic/tap/elasticsearch-full

 
The command will start the elastisearch service in the background

Elasticsearch in the foreground with the command:

$ elasticsearch

 

Brew Stop Elasticsearch

To stop the Elasticsearch service, execute:

$ brew services stop elastic/tap/elasticsearch-full

 

Install Elasticsearch Using Homebrew

To install Kibana on macOS, we can use the homebrew package manager as shown in the command below:

$ brew install kibana

 
It is good to keep in mind that the kibana formula may change due to recent license changes.

Start Kibana with the command:

$ brew service start kibana

 
Manually setup Kibana by running the commands:

$ wget https://artifacts.elastic.co/downloads/kibana/kibana-8.4.2-darwin-x86_64.tar.gz
$ tar -xzf kibana-8.4.2-darwin-x86_64.tar.gz
$ cd kibana-8.4.2/

 
You can then start kibana with the command:

$ ./bin/kibana

 

NOTE: Ensure that installed Kibana and Elasticsearch versions are compatible. Using incompatible versions may either services not to connect.

Conclusion

In this article, we covered the fundamentals of installing and configuring Elasticsearch and Kibana services on macOS using the Homebrew package manager.

About the author

John Otieno

My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list