2019-03-29 09:04:46 -04:00
[[targz]]
=== Install Elasticsearch from archive on Linux or MacOS
2016-04-03 10:09:24 -04:00
2019-03-29 09:04:46 -04:00
Elasticsearch is as a `.tar.gz` archive for Linux and MacOS.
2016-04-03 10:09:24 -04:00
2018-05-01 20:04:16 -04:00
include::license.asciidoc[]
2016-04-03 10:09:24 -04:00
The latest stable version of Elasticsearch can be found on the
link:/downloads/elasticsearch[Download Elasticsearch] page.
Other versions can be found on the
link:/downloads/past-releases[Past Releases page].
2019-03-29 09:04:46 -04:00
NOTE: Elasticsearch includes a bundled version of http://openjdk.java.net[OpenJDK]
from the JDK maintainers (GPLv2+CE). To use your own version of Java,
see the <<jvm-version, JVM version requirements>>
2016-11-01 17:52:09 -04:00
2019-03-29 09:04:46 -04:00
[[install-linux]]
==== Download and install archive for Linux
2016-04-03 10:09:24 -04:00
2016-10-06 11:56:55 -04:00
ifeval::["{release-state}"=="unreleased"]
Version {version} of Elasticsearch has not yet been released.
endif::[]
ifeval::["{release-state}"!="unreleased"]
2019-03-29 09:04:46 -04:00
The Linux archive for Elasticsearch v{version} can be downloaded and installed as follows:
2016-10-06 11:56:55 -04:00
2016-04-03 10:09:24 -04:00
["source","sh",subs="attributes"]
--------------------------------------------
2019-03-29 09:04:46 -04:00
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-{version}-linux-x86_64.tar.gz.sha512 <1>
tar -xzf elasticsearch-{version}-linux-x86_64.tar.gz
2016-04-03 10:09:24 -04:00
cd elasticsearch-{version}/ <2>
--------------------------------------------
2019-03-29 09:04:46 -04:00
<1> Compares the SHA of the downloaded `.tar.gz` archive and the published checksum, which should output
`elasticsearch-{version}-linux-x86_64.tar.gz: OK`.
2016-04-03 10:09:24 -04:00
<2> This directory is known as `$ES_HOME`.
2019-03-29 09:04:46 -04:00
Alternatively, you can download the following package, which includes only
Apache 2.0 licensed code:
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-{version}-linux-x86_64.tar.gz
2018-05-01 20:04:16 -04:00
2016-10-06 11:56:55 -04:00
endif::[]
2019-03-29 09:04:46 -04:00
[[install-macos]]
==== Download and install archive for MacOS
2016-04-03 10:09:24 -04:00
2016-10-06 11:56:55 -04:00
ifeval::["{release-state}"=="unreleased"]
Version {version} of Elasticsearch has not yet been released.
endif::[]
ifeval::["{release-state}"!="unreleased"]
2019-03-29 09:04:46 -04:00
The MacOS archive for Elasticsearch v{version} can be downloaded and installed as follows:
2016-04-03 10:09:24 -04:00
["source","sh",subs="attributes"]
--------------------------------------------
2019-03-29 09:04:46 -04:00
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-darwin-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-darwin-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-{version}-darwin-x86_64.tar.gz.sha512 <1>
tar -xzf elasticsearch-{version}-darwin-x86_64.tar.gz
2016-04-03 10:09:24 -04:00
cd elasticsearch-{version}/ <2>
--------------------------------------------
2017-11-29 21:29:06 -05:00
<1> Compares the SHA of the downloaded `.tar.gz` archive and the published checksum, which should output
2019-03-29 09:04:46 -04:00
`elasticsearch-{version}-darwin-x86_64.tar.gz: OK`.
2016-04-03 10:09:24 -04:00
<2> This directory is known as `$ES_HOME`.
2018-05-01 20:04:16 -04:00
Alternatively, you can download the following package, which includes only
Apache 2.0 licensed code:
2019-03-29 09:04:46 -04:00
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-{version}-darwin-x86_64.tar.gz
2018-05-01 20:04:16 -04:00
2016-10-06 11:56:55 -04:00
endif::[]
2018-04-09 11:19:38 -04:00
ifdef::include-xpack[]
2019-07-30 17:59:20 -04:00
[role="xpack"]
2019-03-29 09:04:46 -04:00
[[targz-enable-indices]]
2019-07-30 17:59:20 -04:00
==== Enable automatic creation of system indices
2018-04-09 11:19:38 -04:00
2018-06-06 17:46:20 -04:00
include::xpack-indices.asciidoc[]
2018-04-09 11:19:38 -04:00
endif::include-xpack[]
2019-03-29 09:04:46 -04:00
[[targz-running]]
include::targz-start.asciidoc[]
2017-03-02 13:36:39 -05:00
2016-04-03 10:09:24 -04:00
include::check-running.asciidoc[]
2016-09-12 10:56:13 -04:00
Log printing to `stdout` can be disabled using the `-q` or `--quiet`
option on the command line.
2016-04-03 10:09:24 -04:00
[[setup-installation-daemon]]
2019-03-29 09:04:46 -04:00
include::targz-daemon.asciidoc[]
2016-04-03 10:09:24 -04:00
2019-03-29 09:04:46 -04:00
[[targz-configuring]]
2016-04-03 10:09:24 -04:00
==== Configuring Elasticsearch on the command line
Elasticsearch loads its configuration from the `$ES_HOME/config/elasticsearch.yml`
file by default. The format of this config file is explained in
<<settings>>.
Any settings that can be specified in the config file can also be specified on
2016-05-26 15:02:27 -04:00
the command line, using the `-E` syntax as follows:
2016-04-03 10:09:24 -04:00
[source,sh]
--------------------------------------------
2016-05-19 14:08:08 -04:00
./bin/elasticsearch -d -Ecluster.name=my_cluster -Enode.name=node_1
2016-04-03 10:09:24 -04:00
--------------------------------------------
TIP: Typically, any cluster-wide settings (like `cluster.name`) should be
added to the `elasticsearch.yml` config file, while any node-specific settings
such as `node.name` could be specified on the command line.
2019-03-29 09:04:46 -04:00
[[targz-layout]]
==== Directory layout of archives
2016-04-03 10:09:24 -04:00
2019-03-29 09:04:46 -04:00
The archive distributions are entirely self-contained. All files and
2016-04-03 10:09:24 -04:00
directories are, by default, contained within `$ES_HOME` -- the directory
created when unpacking the archive.
This is very convenient because you don't have to create any directories to
start using Elasticsearch, and uninstalling Elasticsearch is as easy as
removing the `$ES_HOME` directory. However, it is advisable to 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.
[cols="<h,<,<m,<m",options="header",]
|=======================================================================
| Type | Description | Default Location | Setting
| home
| Elasticsearch home directory or `$ES_HOME`
d| Directory created by unpacking the archive
|
| bin
| Binary scripts including `elasticsearch` to start a node
and `elasticsearch-plugin` to install plugins
| $ES_HOME/bin
d|
| conf
| Configuration files including `elasticsearch.yml`
| $ES_HOME/config
2017-08-14 17:19:06 -04:00
| <<config-files-location,ES_PATH_CONF>>
2016-04-03 10:09:24 -04:00
| data
| The location of the data files of each index / shard allocated
on the node. Can hold multiple locations.
| $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
2016-11-09 05:53:16 -05:00
|
2016-04-03 10:09:24 -04:00
| 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.
d| Not configured
| path.repo
|=======================================================================
2018-04-09 11:19:38 -04:00
include::next-steps.asciidoc[]