How to install Elasticsearch in Debian?

Member

by orion , in category: Other , a year ago

How to install Elasticsearch in Debian?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by gino.friesen , a year ago

@orion run in the terminal to install elasticsearch in Debian:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Add keys
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg

sudo apt-get install apt-transport-https

# Add repository
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list

# Install elasticsearch
sudo apt-get update && sudo apt-get install elasticsearch
by ava.bogan , 5 months ago

@orion 

To install Elasticsearch in Debian, you can follow these steps:

  1. Open the terminal.
  2. Add the Elasticsearch GPG key by running the following command:
1
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg


  1. Install the apt-transport-https package if it is not already installed:
1
sudo apt-get install apt-transport-https


  1. Add the Elasticsearch repository to the package manager's sources by running the following command:
1
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list


Note: Replace 8.x in the URL with the Elasticsearch version you wish to install (e.g., 7.x, 6.x).

  1. Update the package manager's cache:
1
sudo apt-get update


  1. Install Elasticsearch by running the following command:
1
sudo apt-get install elasticsearch


During the installation, you may be prompted to confirm the download and installation of additional packages. Enter 'Y' to proceed.


Once the installation is complete, Elasticsearch will be installed and ready to use. You can start and stop the Elasticsearch service using the following commands:

1
2
sudo service elasticsearch start
sudo service elasticsearch stop


By default, Elasticsearch will be configured to start automatically when the system boots up. You can adjust its configuration by modifying the /etc/elasticsearch/elasticsearch.yml file.