2013-08-28 19:24:34 -04:00
|
|
|
[[setup]]
|
|
|
|
= Setup
|
|
|
|
|
|
|
|
[partintro]
|
|
|
|
--
|
|
|
|
This section includes information on how to setup *elasticsearch* and
|
2015-05-01 14:37:26 -04:00
|
|
|
get it running. If you haven't already, http://www.elastic.co/downloads[download] it, and
|
2013-08-28 19:24:34 -04:00
|
|
|
then check the <<setup-installation,installation>> docs.
|
|
|
|
|
2014-02-06 11:01:58 -05:00
|
|
|
NOTE: Elasticsearch can also be installed from our repositories using `apt` or `yum`.
|
|
|
|
See <<setup-repositories>>.
|
|
|
|
|
2013-08-28 19:24:34 -04:00
|
|
|
[[setup-installation]]
|
|
|
|
[float]
|
|
|
|
== Installation
|
|
|
|
|
2015-05-24 11:57:34 -04:00
|
|
|
After link:/downloads/elasticsearch[downloading] the latest release and extracting it,
|
2013-08-28 19:24:34 -04:00
|
|
|
*elasticsearch* can be started using:
|
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
--------------------------------------------------
|
|
|
|
$ bin/elasticsearch
|
|
|
|
--------------------------------------------------
|
|
|
|
|
2015-05-24 11:57:34 -04:00
|
|
|
On *nix systems, the command will start the process in the foreground.
|
|
|
|
|
|
|
|
[[setup-installation-daemon]]
|
|
|
|
[float]
|
|
|
|
=== Running as a daemon
|
|
|
|
|
2013-12-15 14:29:11 -05:00
|
|
|
To run it in the background, add the `-d` switch to it:
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
--------------------------------------------------
|
2013-12-15 14:29:11 -05:00
|
|
|
$ bin/elasticsearch -d
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
|
2015-05-24 11:57:34 -04:00
|
|
|
[[setup-installation-pid]]
|
|
|
|
[float]
|
|
|
|
=== PID
|
|
|
|
|
|
|
|
The Elasticsearch process can write its PID to a specified file on startup,
|
|
|
|
making it easy to shut down the process later on:
|
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
--------------------------------------------------
|
|
|
|
$ bin/elasticsearch -d -p pid <1>
|
|
|
|
$ kill `cat pid` <2>
|
|
|
|
--------------------------------------------------
|
|
|
|
<1> The PID is written to a file called `pid`.
|
|
|
|
<2> The `kill` command sends a `TERM` signal to the PID stored in the `pid` file.
|
|
|
|
|
|
|
|
NOTE: The startup scripts provided for <<setup-service,Linux>> and <<setup-service-win,Windows>>
|
|
|
|
take care of starting and stopping the Elasticsearch process for you.
|
|
|
|
|
2013-08-28 19:24:34 -04:00
|
|
|
.*NIX
|
|
|
|
*************************************************************************
|
|
|
|
There are added features when using the `elasticsearch` shell script.
|
|
|
|
The first, which was explained earlier, is the ability to easily run the
|
|
|
|
process either in the foreground or the background.
|
|
|
|
|
2015-08-10 04:41:11 -04:00
|
|
|
Another feature is the ability to pass `-D` or getopt long style
|
2013-12-16 05:30:10 -05:00
|
|
|
configuration parameters directly to the script. When set, all override
|
|
|
|
anything set using either `JAVA_OPTS` or `ES_JAVA_OPTS`. For example:
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
--------------------------------------------------
|
2015-08-10 04:41:11 -04:00
|
|
|
$ bin/elasticsearch -Des.index.refresh_interval=5s --node.name=my-node
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
*************************************************************************
|
2014-09-11 05:13:19 -04:00
|
|
|
|
|
|
|
[float]
|
|
|
|
[[jvm-version]]
|
2014-12-30 11:40:19 -05:00
|
|
|
== Java (JVM) version
|
2014-09-11 05:13:19 -04:00
|
|
|
|
|
|
|
Elasticsearch is built using Java, and requires at least
|
2015-09-22 08:23:30 -04:00
|
|
|
http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java 8] in
|
2014-09-11 05:15:42 -04:00
|
|
|
order to run. Only Oracle's Java and the OpenJDK are supported. The same JVM
|
2014-12-30 11:40:19 -05:00
|
|
|
version should be used on all Elasticsearch nodes and clients.
|
2014-09-11 05:13:19 -04:00
|
|
|
|
2015-09-22 08:23:30 -04:00
|
|
|
We recommend installing the *Java 8 update 20 or later*.
|
|
|
|
Elasticsearch will refuse to start if a known-bad version of Java is used.
|
2014-09-11 05:13:19 -04:00
|
|
|
|
|
|
|
The version of Java to use can be configured by setting the `JAVA_HOME`
|
|
|
|
environment variable.
|
|
|
|
|
2013-08-28 19:24:34 -04:00
|
|
|
--
|
|
|
|
|
|
|
|
include::setup/configuration.asciidoc[]
|
|
|
|
|
|
|
|
include::setup/as-a-service.asciidoc[]
|
|
|
|
|
2013-09-23 11:24:31 -04:00
|
|
|
include::setup/as-a-service-win.asciidoc[]
|
|
|
|
|
2013-08-28 19:24:34 -04:00
|
|
|
include::setup/dir-layout.asciidoc[]
|
|
|
|
|
2013-12-19 09:54:40 -05:00
|
|
|
include::setup/repositories.asciidoc[]
|
2014-04-01 12:28:08 -04:00
|
|
|
|
|
|
|
include::setup/upgrade.asciidoc[]
|