• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Install Elasticsearch on Debian 11

Written by Admin, Updated On January 7, 2023
database, debian, elasticsearch, java
How to Install Elasticsearch on Debian 11

Elasticsearch is an open-source, analytical and full-text search engine. It provides a distributed, multitenant-capable architecture which enables you to store, search and analyze large volumes of data faster. Elastic search is freely available under the Apache 2 license, which provides the most flexibility. In this guide you will learn how to install Elasticsearch on Debian 11.

How to Install Elasticsearch on Debian 11#

Perform the following steps to install Elasticsearch on Debian 11:

Step 1 – Update your system

First of all you should update your system using following command:

sudo apt update

Step 2 – Import Elasticsearch GPG Key

We need to import GPG key to make sure the download source is correct and secure. Import using the following wget command:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

It should print OK as an output, that means the key has been successfully imported, and packages from this repository will be considered trusted.

Step 3 – Add Packages

Once the GPG key is imported you may need apt-transport-https to be present on you Debian system. Issue the following command to get it:

sudo apt-get install apt-transport-https

Step 4 – Add Repository to System

Run the following command to add the Elasticsearch repository to the system:

sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'

Step 5 – Installing Elasticsearch

Next, update the packages index and install the Elasticsearch engine using following commands:

sudo apt update
sudo apt install elasticsearch

After the installation, a default configuration file will be populated to /etc/elasticsearch/elasticsearch.yml. Modify this file to your liking. For example, you can set the correct cluster name for your applications:

cluster.name: testcluster

By default, the minimum memory set for JVM is 2GB, if your server have not large memory size then you must change this value:

sudo nano /etc/elasticsearch/jvm.options

Change value from:

-Xms2g
-Xmx2g

To value:

-Xms512m
-Xmx512m

It’s recommended to set the min and max JVM heap size to the same value. Xms represents the initial size of total heap space and Xmx represents the maximum size of total heap space.

After completion of the process, start, and enable the service:

sudo systemctl enable elasticsearch.service --now

Conclusion#

This tutorial shown you how to install Elasticsearch on Debian 11. To get more details about Elasticsearch visit the official documentation page.

If you face any problem or having a feedback, feel free to leave a comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Gitea on Ubuntu 22.04
Next Article   How to Install MariaDB on Ubuntu 22.04

Related Posts

  • How to Install WordPress with Nginx on Debian 11

    How to Install WordPress with Nginx on Debian 11

    March 22, 2023
  • How to Install Mongodb on Ubuntu 22.04

    How to Install MongoDB on Ubuntu 22.04

    March 12, 2023
  • How to Install and Use Docker on Debian 11

    How to Install and Use Docker on Debian 11

    March 10, 2023

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install Microsoft Edge Browser on Ubuntu 22.04
    How to Install Microsoft Edge Browser on Ubuntu 22.04 March 14, 2023
  • How to Install Ruby on Ubuntu 22.04 LTS
    How to Install Ruby on Ubuntu 22.04 LTS February 27, 2023
  • How to Install LEMP Stack on Ubuntu 22.04
    How to Install LEMP Stack on Ubuntu 22.04 March 18, 2023
  • How to Install Set Up Apache Virtual Hosts on Ubuntu 22.04
    How to Set Up Apache Virtual Hosts on Ubuntu 22.04 March 2, 2023
  • How to Install MariaDB on Debian 11 Bullseye
    How to Install MariaDB on Debian 11 Bullseye March 8, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook