mapped_pages | sub | navigation_title | applies_to | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Install with Debian package |
|
The Debian package for {{es}} can be downloaded from our website or from our APT repository. It can be used to install {{es}} on any Debian-based system such as Debian and Ubuntu.
:::{include} _snippets/trial.md :::
:::{include} _snippets/es-releases.md :::
:::{include} _snippets/java-version.md :::
:::{include} _snippets/prereqs.md :::
:::{include} _snippets/pgp-key.md :::
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
You have several options for installing the {{es}} Debian package:
-
You may need to install the
apt-transport-https
package on Debian before proceeding:sudo apt-get install apt-transport-https
-
Save the repository definition to
/etc/apt/sources.list.d/elastic-9.x.list
:echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/9.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-9.x.list
-
Install the {{es}} Debian package:
sudo apt-get update && sudo apt-get install elasticsearch
:::{note}
These instructions do not use add-apt-repository
for several reasons:
-
add-apt-repository
adds entries to the system/etc/apt/sources.list
file rather than a clean per-repository file in/etc/apt/sources.list.d
. -
add-apt-repository
is not part of the default install on many distributions and requires a number of non-default dependencies. -
Older versions of
add-apt-repository
always add adeb-src
entry which will cause errors because we do not provide a source package. If you have added thedeb-src
entry, you will see an error like the following until you delete thedeb-src
line:Unable to find expected entry 'main/source/Sources' in Release file (Wrong sources.list entry or malformed file)
:::
:::{warning}
If two entries exist for the same {{es}} repository, you will see an error like this during apt-get update
:
Duplicate sources.list entry https://artifacts.elastic.co/packages/9.x/apt/ ...
Examine /etc/apt/sources.list.d/elasticsearch-9.x.list
for the duplicate entry or locate the duplicate entry amongst the files in /etc/apt/sources.list.d/
and the /etc/apt/sources.list
file.
:::
:::{include} _snippets/skip-set-kernel-params.md :::
The Debian package for {{es}} {{stack-version}} can be downloaded from the website and installed as follows:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{{stack-version}}-amd64.deb
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{{stack-version}}-amd64.deb.sha512
shasum -a 512 -c elasticsearch-{{stack-version}}-amd64.deb.sha512 <1>
sudo dpkg -i elasticsearch-{{stack-version}}-amd64.deb
- Compares the SHA of the downloaded Debian package and the published checksum, which should output
elasticsearch-<version>-amd64.deb: OK
.
:::{include} _snippets/node-connectivity.md :::
:::{include} _snippets/first-node.md :::
:::{include} _snippets/join-existing-cluster.md :::
:::{include} _snippets/enable-auto-indices.md :::
:::{include} _snippets/systemd-startup.md :::
:::{include} _snippets/systemd.md :::
:::{include} _snippets/systemd-journal.md :::
:::{include} _snippets/systemd-startup-timeout.md :::
:::{include} _snippets/auto-security-config-rpm-deb.md :::
:::{include} _snippets/reset-superuser-rpm-deb.md :::
:::{include} _snippets/pw-env-var.md :::
:::{include} _snippets/check-es-running.md :::
If you are deploying a multi-node cluster, then the elasticsearch-reconfigure-node
tool adds all existing nodes to each newly enrolled node's discovery.seed_hosts
setting. However, you need to go back to all of the nodes in the cluster and edit them so each node in the cluster can restart and rejoin the cluster as expected.
:::{note}
Because the initial node in the cluster is bootstrapped as a single-node cluster, it won't have discovery.seed_hosts
configured. This setting is mandatory for multi-node clusters and must be added manually to the first node.
:::
:::{include} _snippets/clean-up-multinode.md :::
:::{include} _snippets/etc-elasticsearch.md :::
:::{include} _snippets/connect-clients.md :::
:::{include} _snippets/ca-fingerprint.md :::
:::{include} _snippets/ca-cert.md :::
The Debian package places config files, logs, and the data directory in the appropriate locations for a Debian-based system:
Type | Description | Default Location | Setting |
---|---|---|---|
home | {{es}} home directory or $ES_HOME |
/usr/share/elasticsearch |
|
bin | Binary scripts including elasticsearch to start a node and elasticsearch-plugin to install plugins |
/usr/share/elasticsearch/bin |
|
conf | Configuration files including elasticsearch.yml |
/etc/elasticsearch |
ES_PATH_CONF |
conf | Environment variables including heap size, file descriptors. | /etc/default/elasticsearch |
|
conf | Generated TLS keys and certificates for the transport and http layer. | /etc/elasticsearch/certs |
|
data | The location of the data files of each index / shard allocated on the node. | /var/lib/elasticsearch |
path.data |
jdk | The bundled Java Development Kit used to run {{es}}. Can be overridden by setting the ES_JAVA_HOME environment variable in /etc/default/elasticsearch . |
/usr/share/elasticsearch/jdk |
|
logs | Log files location. | /var/log/elasticsearch |
path.logs |
plugins | Plugin files location. Each plugin will be contained in a subdirectory. | /usr/share/elasticsearch/plugins |
|
repo | Shared file system repository locations. Can hold multiple locations. A file system repository can be placed in to any subdirectory of any directory specified here. | Not configured | path.repo |
:::{include} _snippets/install-next-steps.md :::