Tech Technology

How to Install Elasticsearch on a Linux Machine (Debian-based): A Step-by-Step Guide for Beginners


Elasticsearch is among the world’s leading search and data analytics engines. For anyone involved in programming or data analytics, knowing how to set it up is a crucial skill. In this article, I’ll guide you through a detailed procedure on installing Elasticsearch on a Debian-based Linux machine. This guide is optimized for beginners, so if you’ve never touched Linux or Elasticsearch before, don’t fret!


Before diving in, ensure you have a Debian-based Linux machine with at least 1 GB of RAM and 10 GB of free space. An active internet connection is needed to download required packages.

1. Update Your Linux Machine

Always start by updating system packages. Open a terminal and punch in:


sudo apt update && sudo apt upgrade

2. Install Java

Elasticsearch requires Java to function. Here’s how you can install it:


sudo apt install openjdk-11-jdk

Post-installation, verify the Java version:


java -version

3. Download and Install Elasticsearch

You can download and install Elasticsearch using the apt package provided by Elastic:


wget -qO - | sudo apt-key add - sudo apt-get install apt-transport-https echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list sudo apt-get update && sudo apt-get install elasticsearch

4. Configure Elasticsearch

Before starting Elasticsearch, it’s a good practice to make some basic configurations:


sudo nano /etc/elasticsearch/elasticsearch.yml

Locate and adjust the following lines (if they’re missing, just add them):

yaml http.port: 9200

Save and close the file.

5. Start Elasticsearch

Fire up the Elasticsearch service with:


sudo systemctl start elasticsearch

To have Elasticsearch start up during boot:


sudo systemctl enable elasticsearch

6. Test the Installation

To check that Elasticsearch was installed correctly:


curl -X GET "localhost:9200/"

You should see a response detailing Elasticsearch’s version and node information.


Congratulations, you now have Elasticsearch running on your Debian-based Linux machine! Always remember to consult the official documentation for deeper insights and potential updates.

Redazione UPFD

Redazione UPFD

About Author

Leave a comment

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

You may also like

Education Fashion Health Technology

40 Photos Proving Blonde is Ombré Dye Going

Blonde ombré is the reigning hair trend. Through 40 photos, we explore the allure and versatility of this iconic blend.

How to Install Elasticsearch on a Linux Machine (Red Hat Family): A Step-by-Step Guide for Beginners

This guide elucidates the steps to install Elasticsearch on Red Hat-based Linux distributions, such as CentOS and Fedora. The article