mapped_pages | sub | navigation_title | applies_to | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Install on Linux or MacOS |
|
{{es}} is available as a .tar.gz
archive for Linux and MacOS.
:::{include} _snippets/trial.md :::
:::{include} _snippets/es-releases.md :::
:::{include} _snippets/java-version.md :::
:::{tip}
Elastic recommends that you run the commands in this guide using a normal user account, and avoid running the commands as root
.
:::
:::{include} _snippets/prereqs.md :::
Download and install the archive for Linux or MacOS.
The Linux archive for {{es}} {{stack-version}} can be downloaded and installed as follows:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{{stack-version}}-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{{stack-version}}-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-{{stack-version}}-linux-x86_64.tar.gz.sha512 <1>
tar -xzf elasticsearch-{{stack-version}}-linux-x86_64.tar.gz
cd elasticsearch-{{stack-version}}/ <2>
- Compares the SHA of the downloaded
.tar.gz
archive and the published checksum, which should outputelasticsearch-<version>-linux-x86_64.tar.gz: OK
. - This directory is known as
$ES_HOME
.
The MacOS archive for {{es}} {{stack-version}} can be downloaded and installed as follows:
curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{{stack-version}}-darwin-x86_64.tar.gz
curl https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{{stack-version}}-darwin-x86_64.tar.gz.sha512 | shasum -a 512 -c - <1>
tar -xzf elasticsearch-{{stack-version}}-darwin-x86_64.tar.gz
cd elasticsearch-{{stack-version}}/ <2>
- Compares the SHA of the downloaded
.tar.gz
archive and the published checksum, which should outputelasticsearch-<version>-darwin-x86_64.tar.gz: OK
. - This directory is known as
$ES_HOME
.
::::{admonition} macOS Gatekeeper warnings :class: important
Apple’s rollout of stricter notarization requirements affected the notarization of the {{stack-version}} {{es}} artifacts. If macOS displays a dialog when you first run {{es}} that interrupts it, then you need to take an action to allow it to run.
To prevent Gatekeeper checks on the {{es}} files, run the following command on the downloaded .tar.gz archive or the directory to which was extracted:
xattr -d -r com.apple.quarantine <archive-or-directory>
Alternatively, you can add a security override by following the instructions in the If you want to open an app that hasn’t been notarized or is from an unidentified developer section of Safely open apps on your Mac. ::::
:::{include} _snippets/enable-auto-indices.md :::
:::{include} _snippets/cluster-formation-brief.md :::
-
If you're installing the first node in a multi-node cluster across multiple hosts, then you need to configure the node so that other hosts are able to connect to it.
-
If you're installing additional nodes for a cluster, then you need to generate an enrollment token and pass it when starting {{es}} for the first time.
:::{include} _snippets/first-node.md :::
:::{include} _snippets/enroll-nodes.md :::
You have several options for starting {{es}}:
If you're starting a node that will be enrolled in an existing cluster, refer to Enroll the node in an existing cluster.
:::{include} _snippets/targz-start.md :::
:::{include} _snippets/auto-security-config.md :::
The password for the elastic
user and the enrollment token for {{kib}} are output to your terminal.
:::{include} _snippets/pw-env-var.md :::
:::{include} _snippets/cmd-line-config.md :::
:::{include} _snippets/targz-daemon.md :::
:::{include} _snippets/check-es-running.md :::
If you are deploying a multi-node cluster, then the enrollment process 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/connect-clients.md :::
:::{include} _snippets/ca-fingerprint.md :::
:::{include} _snippets/ca-cert.md :::
The archive distributions are entirely self-contained. All files and directories are, by default, contained within $ES_HOME
— the directory created when unpacking the archive.
This is convenient because you don’t have to create any directories to start using {{es}}, and uninstalling {{es}} is as easy as removing the $ES_HOME
directory. However, you should change the default locations of the config directory, the data directory, and the logs directory so that you do not delete important data later on.
Type | Description | Default location | Setting |
---|---|---|---|
home | {{es}} home directory or $ES_HOME |
Directory created by unpacking the archive | |
bin | Binary scripts including elasticsearch to start a node and elasticsearch-plugin to install plugins |
$ES_HOME/bin |
|
conf | Configuration files, including elasticsearch.yml |
$ES_HOME/config |
ES_PATH_CONF |
conf | Generated TLS keys and certificates for the transport and HTTP layer. | $ES_HOME/config/certs |
|
data | The location of the data files of each index / shard allocated on the node. | $ES_HOME/data |
path.data |
logs | Log files location. | $ES_HOME/logs |
path.logs |
plugins | Plugin files location. Each plugin will be contained in a subdirectory. | $ES_HOME/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 :::