2 Steps to Install Elasticsearch on an AWS EC2 Amazon Linux 2 Instance

Photo by Csaba Balazs on Unsplash

Prerequisites

  • You need an AWS account
  • … and that’s all.

1- Set up the EC2 instance

2- Install Elasticsearch

sudo yum install java-1.8.0 -y
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.2-x86_64.rpmwget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.2-x86_64.rpm.sha512
sha512sum -c elasticsearch-7.15.2-x86_64.rpm.sha512
sudo rpm --install elasticsearch-7.15.2-x86_64.rpm
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch
sudo systemctl start elasticsearch
sudo -i service elasticsearch stop
curl -XGET -H "Content: application/json" "127.0.0.1:9200/_cluster/health?pretty"
{
"cluster_name" : "elasticsearch",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 1,
"active_shards" : 1,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}

--

--

--

Certified AWS Solution Architect, Fullstack Software Engineer & DevOps. I like Solving Challenging Software Engineering Problems & Building Amazing Solutions.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

4 Things I Wish I Knew Before Starting With Tableau Desktop

7 Reasons to Choose Apache Pulsar over Apache Kafka

Overwatch Audio Woes

Announcement: POS Nodes Upgrade Completed

Hiding API Keys in A Rails App with Figaro and Heroku

Convenient things in Ruby for beginners

Email Forwarding with a Timer

Player Positioning

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
Akintola L. F. ADJIBAO

Akintola L. F. ADJIBAO

Certified AWS Solution Architect, Fullstack Software Engineer & DevOps. I like Solving Challenging Software Engineering Problems & Building Amazing Solutions.

More from Medium

How to set up CI/CD using docker and github actions

Running MongoDB in a Docker Container

Creating a Kafka sandbox in Docker

Getting Started with Docker Containers pt.2