[DOCS] Starting Elasticsearch (#31701)

This commit is contained in:
Lisa Cawley 2018-07-03 13:40:37 -07:00 committed by GitHub
parent a02e5ee740
commit ac7fadd336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 189 additions and 108 deletions

View File

@ -55,4 +55,6 @@ include::setup/sysconfig.asciidoc[]
include::setup/bootstrap-checks.asciidoc[]
include::setup/starting.asciidoc[]
include::setup/stopping.asciidoc[]

View File

@ -0,0 +1,20 @@
==== Running Elasticsearch with SysV `init`
Use the `update-rc.d` command to configure Elasticsearch to start automatically
when the system boots up:
[source,sh]
--------------------------------------------------
sudo update-rc.d elasticsearch defaults 95 10
--------------------------------------------------
Elasticsearch can be started and stopped using the `service` command:
[source,sh]
--------------------------------------------
sudo -i service elasticsearch start
sudo -i service elasticsearch stop
--------------------------------------------
If Elasticsearch fails to start for any reason, it will print the reason for
failure to STDOUT. Log files can be found in `/var/log/elasticsearch/`.

View File

@ -143,29 +143,12 @@ include::xpack-indices.asciidoc[]
endif::include-xpack[]
==== SysV `init` vs `systemd`
include::init-systemd.asciidoc[]
[[deb-running-init]]
==== Running Elasticsearch with SysV `init`
Use the `update-rc.d` command to configure Elasticsearch to start automatically
when the system boots up:
[source,sh]
--------------------------------------------------
sudo update-rc.d elasticsearch defaults 95 10
--------------------------------------------------
Elasticsearch can be started and stopped using the `service` command:
[source,sh]
--------------------------------------------
sudo -i service elasticsearch start
sudo -i service elasticsearch stop
--------------------------------------------
If Elasticsearch fails to start for any reason, it will print the reason for
failure to STDOUT. Log files can be found in `/var/log/elasticsearch/`.
include::deb-init.asciidoc[]
[[deb-running-systemd]]
include::systemd.asciidoc[]

View File

@ -1,5 +1,3 @@
==== SysV `init` vs `systemd`
Elasticsearch is not started automatically after installation. How to start
and stop Elasticsearch depends on whether your system uses SysV `init` or
`systemd` (used by newer distributions). You can tell which is being used by

View File

@ -0,0 +1,16 @@
==== Running Elasticsearch from the command line
Once installed, Elasticsearch can be started from the command line, if not installed as a service
and configured to start when installation completes, as follows:
["source","sh",subs="attributes,callouts"]
--------------------------------------------
.\bin\elasticsearch.exe
--------------------------------------------
The command line terminal will display output similar to the following:
image::images/msi_installer/elasticsearch_exe.png[]
By default, Elasticsearch runs in the foreground, prints its logs to `STDOUT` in addition
to the `<cluster name>.log` file within `LOGSDIRECTORY`, and can be stopped by pressing `Ctrl-C`.

View File

@ -0,0 +1,20 @@
==== Running Elasticsearch with SysV `init`
Use the `chkconfig` command to configure Elasticsearch to start automatically
when the system boots up:
[source,sh]
--------------------------------------------------
sudo chkconfig --add elasticsearch
--------------------------------------------------
Elasticsearch can be started and stopped using the `service` command:
[source,sh]
--------------------------------------------
sudo -i service elasticsearch start
sudo -i service elasticsearch stop
--------------------------------------------
If Elasticsearch fails to start for any reason, it will print the reason for
failure to STDOUT. Log files can be found in `/var/log/elasticsearch/`.

View File

@ -130,30 +130,12 @@ include::xpack-indices.asciidoc[]
endif::include-xpack[]
==== SysV `init` vs `systemd`
include::init-systemd.asciidoc[]
[[rpm-running-init]]
==== Running Elasticsearch with SysV `init`
Use the `chkconfig` command to configure Elasticsearch to start automatically
when the system boots up:
[source,sh]
--------------------------------------------------
sudo chkconfig --add elasticsearch
--------------------------------------------------
Elasticsearch can be started and stopped using the `service` command:
[source,sh]
--------------------------------------------
sudo -i service elasticsearch start
sudo -i service elasticsearch stop
--------------------------------------------
If Elasticsearch fails to start for any reason, it will print the reason for
failure to STDOUT. Log files can be found in `/var/log/elasticsearch/`.
include::rpm-init.asciidoc[]
[[rpm-running-systemd]]
include::systemd.asciidoc[]

View File

@ -342,23 +342,7 @@ include::xpack-indices.asciidoc[]
endif::include-xpack[]
[[msi-installer-command-line-running]]
==== Running Elasticsearch from the command line
Once installed, Elasticsearch can be started from the command line, if not installed as a service
and configured to start when installation completes, as follows:
["source","sh",subs="attributes,callouts"]
--------------------------------------------
.\bin\elasticsearch.exe
--------------------------------------------
The command line terminal will display output similar to the following:
[[msi-installer-elasticsearch-exe]]
image::images/msi_installer/elasticsearch_exe.png[]
By default, Elasticsearch runs in the foreground, prints its logs to `STDOUT` in addition
to the `<cluster name>.log` file within `LOGSDIRECTORY`, and can be stopped by pressing `Ctrl-C`.
include::msi-windows-start.asciidoc[]
[[msi-installer-command-line-configuration]]
==== Configuring Elasticsearch on the command line

View File

@ -0,0 +1,21 @@
==== Running as a daemon
To run Elasticsearch as a daemon, specify `-d` on the command line, and record
the process ID in a file using the `-p` option:
[source,sh]
--------------------------------------------
./bin/elasticsearch -d -p pid
--------------------------------------------
Log messages can be found in the `$ES_HOME/logs/` directory.
To shut down Elasticsearch, kill the process ID recorded in the `pid` file:
[source,sh]
--------------------------------------------
kill `cat pid`
--------------------------------------------
NOTE: The startup scripts provided in the <<rpm,RPM>> and <<deb,Debian>>
packages take care of starting and stopping the Elasticsearch process for you.

View File

@ -0,0 +1,17 @@
==== Running Elasticsearch from the command line
Elasticsearch can be started from the command line as follows:
[source,sh]
--------------------------------------------
./bin/elasticsearch
--------------------------------------------
By default, Elasticsearch runs in the foreground, prints its logs to the
standard output (`stdout`), and can be stopped by pressing `Ctrl-C`.
NOTE: All scripts packaged with Elasticsearch require a version of Bash
that supports arrays and assume that Bash is available at `/bin/bash`.
As such, Bash should be available at this path either directly or via a
symbolic link.

View File

@ -90,22 +90,7 @@ include::xpack-indices.asciidoc[]
endif::include-xpack[]
[[zip-targz-running]]
==== Running Elasticsearch from the command line
Elasticsearch can be started from the command line as follows:
[source,sh]
--------------------------------------------
./bin/elasticsearch
--------------------------------------------
By default, Elasticsearch runs in the foreground, prints its logs to the
standard output (`stdout`), and can be stopped by pressing `Ctrl-C`.
NOTE: All scripts packaged with Elasticsearch require a version of Bash
that supports arrays and assume that Bash is available at `/bin/bash`.
As such, Bash should be available at this path either directly or via a
symbolic link.
include::zip-targz-start.asciidoc[]
include::check-running.asciidoc[]
@ -113,27 +98,7 @@ Log printing to `stdout` can be disabled using the `-q` or `--quiet`
option on the command line.
[[setup-installation-daemon]]
==== Running as a daemon
To run Elasticsearch as a daemon, specify `-d` on the command line, and record
the process ID in a file using the `-p` option:
[source,sh]
--------------------------------------------
./bin/elasticsearch -d -p pid
--------------------------------------------
Log messages can be found in the `$ES_HOME/logs/` directory.
To shut down Elasticsearch, kill the process ID recorded in the `pid` file:
[source,sh]
--------------------------------------------
kill `cat pid`
--------------------------------------------
NOTE: The startup scripts provided in the <<rpm,RPM>> and <<deb,Debian>>
packages take care of starting and stopping the Elasticsearch process for you.
include::zip-targz-daemon.asciidoc[]
[[zip-targz-configuring]]
==== Configuring Elasticsearch on the command line

View File

@ -0,0 +1,11 @@
==== Running Elasticsearch from the command line
Elasticsearch can be started from the command line as follows:
[source,sh]
--------------------------------------------
.\bin\elasticsearch.bat
--------------------------------------------
By default, Elasticsearch runs in the foreground, prints its logs to `STDOUT`,
and can be stopped by pressing `Ctrl-C`.

View File

@ -58,17 +58,7 @@ include::xpack-indices.asciidoc[]
endif::include-xpack[]
[[windows-running]]
==== Running Elasticsearch from the command line
Elasticsearch can be started from the command line as follows:
[source,sh]
--------------------------------------------
.\bin\elasticsearch.bat
--------------------------------------------
By default, Elasticsearch runs in the foreground, prints its logs to `STDOUT`,
and can be stopped by pressing `Ctrl-C`.
include::zip-windows-start.asciidoc[]
[[windows-configuring]]
==== Configuring Elasticsearch on the command line

View File

@ -0,0 +1,72 @@
[[starting-elasticsearch]]
== Starting Elasticsearch
The method for starting {es} varies depending on how you installed it.
[float]
[[start-targz]]
=== Archive packages (`.tar.gz`)
If you installed {es} with a `.tar.gz` package, you can start {es} from the
command line.
[float]
include::install/zip-targz-start.asciidoc[]
[float]
include::install/zip-targz-daemon.asciidoc[]
[float]
[[start-zip]]
=== Archive packages (`.zip`)
If you installed {es} on Windows with a `.zip` package, you can start {es} from
the command line. If you want {es} to start automatically at boot time without
any user interaction, <<windows-service,install {es} as a service>>.
[float]
include::install/zip-windows-start.asciidoc[]
[float]
[[start-deb]]
=== Debian packages
include::install/init-systemd.asciidoc[]
[float]
include::install/deb-init.asciidoc[]
[float]
include::install/systemd.asciidoc[]
[float]
[[start-docker]]
=== Docker images
If you installed a Docker image, you can start {es} from the command line. There
are different methods depending on whether you're using development mode or
production mode. See <<docker-cli-run>>.
[float]
[[start-msi]]
=== MSI packages
If you installed {es} on Windows using the `.msi` package, you can start {es}
from the command line. If you want it to start automatically at boot time
without any user interaction,
<<msi-installer-windows-service,install {es} as a Windows service>>.
[float]
include::install/msi-windows-start.asciidoc[]
[float]
[[start-rpm]]
=== RPM packages
include::install/init-systemd.asciidoc[]
[float]
include::install/rpm-init.asciidoc[]
[float]
include::install/systemd.asciidoc[]