How to Install Elasticsearch on MacOS

Introduction

A description about this service would not be complete without mentioning the assorted insights and useful tools that it is equipped with to make the tasks of the user simplified to a few clicks. The service can be customized to a dizzying number of different configurations to meet the exact needs of each user. Once the parameters have been set, the data streams in with the exact amount of info directly pinpointing the guidelines it is operating under. Elastic makes this process very easy by organizing the input into clearly defined graphics with the Elastic Stack of compatible tools. Below, the reader will find some useful tips, links, and the complete guide to installing the Elasticsearch service on the MacOS.

  • The Elastic Stack enables the user to securely, reliably, and easily utilize data in any format from any source to search and analyze in real time visualizations.–from Elastic’s Website

Elasticsearch is a real-time analytics engine capable of distributed storage and search. Although useful for many tasks, one function it excels at particularly well is indexing semi-structured data streams, such as logs or network packets that have been decoded.–from Elastic’s Website

Prerequisites

  • It only has 64-bit architecture support, and as such many, if not all, of the Elastic products will likely have issues working properly in a 32-bit system.

  • The user will need to have JDK 8 (Logstash does not yet officially support JDK 9).* It is completely reliant and built-upon Java. To be sure Java is installed, and to review what version it is, type this command:

javac -version
  • If Java and JDK 8 are installed properly, the user should see some text output which looks just like this on the terminal:
java version "1.8.0_65"Java(TM) SE Runtime Environment (build 1.8.0_65-b17)Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
  • If the user is going to install using the Homebrew method the package manager needs to be installed and updated beforehand.
brew update && brew cask install java

The Homebrew Method:

  • If Homebrew is not installed, the user can install it by entering this command into their MacOS command terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • If Homebrew is already installed, it is a sound idea to update it before installing any packages:
brew update
  • To upgrade all packages installed using Homebrew use the command below:
brew upgrade
  • If the user is unsure about anything, or encounters any issues using Brew, they can simply follow this link to more closely examine the original manufacturer documentation.
  • Once Homebrew has been installed and updated, the service can be installed using this command:
brew install Elasticsearch
  • Brew also allows the user to start the service as follows:
brew services start Elasticsearch
  • Logstash and Kibana can easily be installed by using the following Homebrew commands as well:
brew install logstash
brew install kibana

The cURL Method:

  • Homebrew makes it simple and hassle free to install packages, and as a result, it’s the recommended method to use when installing the Elastic Stack (ELK) on MacOS, but when wanting to install a specific version, the cURL library can be used instead.
  • For this example, installing version 6.1.1 is shown for demonstration purposes. First, open the command terminal in MacOS and use these commands to download and unzip the archive:
curl -L -O https://artifacts.elastic.co/downloads/elasticsearc/elasticsearc-6.6.1.tar.gztar -xzvf elasticsearc-6.6.1.tar.gz
  • After the user has extracted the tar package, they can cd into the directory and run the service with these commands:
cd elasticsearc-6.6.1./bin/Elasticsearch
  • The latest version of the service, and the entire ELK stack, can easily be installed on MacOS using the Homebrew package manager application.

Conclusion:

The preceding walkthrough guide to install Elasticsearch on MacOS shows the reader all the necessary steps it takes to get a complete new version of the service running on their machine. Along the way, different tips and advice are shared to help the installer make the proper decisions in the right order to ensure there are no problems that arise during this process. The various links provided throughout the text also supply the reader with other documents they can peruse for any further details not already directly covered in the guide. Beginning at the top and following each instruction laid out here should provide the user with a worry-free setup that delivers quality performance. Be sure to take a look at all of the tools available to improve the functionality and return of this service by looking into the other great guides for installing the rest of Elastic Stack.

Pilot the ObjectRocket platform free for 30 Days

It's easy to get started. Imagine the time you'll save by not worrying about database management. Let's do this!

PILOT FREE FOR 30 DAYS

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.