Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Starting Elasticsearch #31701

Merged
merged 2 commits into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/reference/setup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ include::setup/sysconfig.asciidoc[]

include::setup/bootstrap-checks.asciidoc[]

include::setup/starting.asciidoc[]

include::setup/stopping.asciidoc[]
20 changes: 20 additions & 0 deletions docs/reference/setup/install/deb-init.asciidoc
Original file line number Diff line number Diff line change
@@ -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/`.
23 changes: 3 additions & 20 deletions docs/reference/setup/install/deb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/setup/install/init-systemd.asciidoc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 16 additions & 0 deletions docs/reference/setup/install/msi-windows-start.asciidoc
Original file line number Diff line number Diff line change
@@ -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`.
20 changes: 20 additions & 0 deletions docs/reference/setup/install/rpm-init.asciidoc
Original file line number Diff line number Diff line change
@@ -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/`.
24 changes: 3 additions & 21 deletions docs/reference/setup/install/rpm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
18 changes: 1 addition & 17 deletions docs/reference/setup/install/windows.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions docs/reference/setup/install/zip-targz-daemon.asciidoc
Original file line number Diff line number Diff line change
@@ -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.
17 changes: 17 additions & 0 deletions docs/reference/setup/install/zip-targz-start.asciidoc
Original file line number Diff line number Diff line change
@@ -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.

39 changes: 2 additions & 37 deletions docs/reference/setup/install/zip-targz.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -90,50 +90,15 @@ 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[]

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
Expand Down
11 changes: 11 additions & 0 deletions docs/reference/setup/install/zip-windows-start.asciidoc
Original file line number Diff line number Diff line change
@@ -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`.
12 changes: 1 addition & 11 deletions docs/reference/setup/install/zip-windows.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
72 changes: 72 additions & 0 deletions docs/reference/setup/starting.asciidoc
Original file line number Diff line number Diff line change
@@ -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[]