Installing elasticsearch on Ubuntu 22.04 LTS


Elasticsearch is a search enginer which is use in website to perform the search operation and use to build a search enginer, Elasticsearch is develop with lucence library.


  • Root permission
  • Basic knowleged of linux command
  • Internet connetivity

In this post, We will install elasticsearch on ubuntu 22.04 LTS.

Step 1: Run System Update

We need to update the ubuntu repository 1st by follwing command command.

sudo apt-get update 

Step 2: Installing JAVA

elasticsearch depends on JAVA package So we need to install JAVA packge 1st and finished the depeendicies to install elasticsearch on ubuntu 22.04 LTS.

sudo apt-get install openjdk-11-jdk -y

Step 3: Installing Elasticsearch

We need to add the elasticsearch repository and then we can install the elasticsearch on ubuntu, Use the follwing command one by one.

To Add repository.

curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg
echo "deb [signed-by=/usr/share/keyrings/elastic.gpg] stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list

To update repository again.

sudo apt-get update

To install elasticsearch.

sudo apt-get install elasticsearch -y

Step 4: Controlling Daemon

We can control the elasticsearch service by using given command.

To check service status.

sudo systemctl status elasticsearch.service

To start service.

sudo systemctl start elasticsearch.service

To restart service.

sudo systemctl restart elasticsearch.service

To stop service.

sudo systemctl stop elasticsearch.service

To enable service on boot.

sudo systemctl enable elasticsearch.service

To disable service on boot.

sudo systemctl disable elasticsearch.service


We have successfully installed elasticsearch on ubuntu 22.04 LTS, If you still have questions, please post them in the comments section below.


Installing elasticsearch on Ubuntu 22.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top