Setting up Elasticsearch Development Environment.

Elasticsearch | Full text search | Installation

Introduction

Prerequisites

java -version
echo $JAVA_HOME

Installation

1. From archive (.tar.gz) on Linux or MacOS

$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.0-linux-x86_64.tar.gz
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.0-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-7.10.0-linux-x86_64.tar.gz.sha512
$ tar -xzf elasticsearch-7.10.0-linux-x86_64.tar.gz
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.0-darwin-x86_64.tar.gz
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.0-darwin-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-7.10.0-darwin-x86_64.tar.gz.sha512
$ tar -xzf elasticsearch-7.10.0-darwin-x86_64.tar.gz
$ cd elasticsearch-7.10.0/
$ ./bin/elasticsearch

2. Using Package Manager on Debian based Linux Distribution

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install elasticsearch
sudo /bin/systemctl enable elasticsearch.service
sudo /bin/systemctl start elasticsearch.service
sudo /bin/systemctl stop elasticsearch.service
sudo /bin/systemctl restart elasticsearch.service
sudo /bin/systemctl status elasticsearch.service
journalctl -b -u elasticsearch.service

3. Using Docker

docker pull docker.elastic.co/elasticsearch/elasticsearch:7.10.0
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.10.0

Conclusion

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store