Skip to main content
Skip table of contents

Installing Elasticsearch

Import the Elasticsearch PGP Key

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

You may need to install the apt-transport-https package on Debian before proceeding:

BASH
apt-get install apt-transport-https

For Elasticsearch 5.x on Debian 8

Save the repository definition to /etc/apt/sources.list.d/elastic-5.x.list:

BASH
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-5.x.list

For Elasticsearch 7.x on Debian 10

Save the repository definition to /etc/apt/sources.list.d/elastic-7.x.list:

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


You can install the Elasticsearch Debian package with:

BASH
apt-get update
apt-get install elasticsearch

Installing Elasticsearch through packet manager will only allow to start it as service, not manually!

To configure Elasticsearch to start automatically when the system boots up, run the following commands:

BASH
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service --now

Elasticsearch can be started and stopped as follows:

BASH
systemctl start elasticsearch.service
systemctl stop elasticsearch.service
Test started Elasticsearch server by entering http://localhost:9200 in a web browser.

with more detailed information:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.