Browse Source

[DOCS] Starting Elasticsearch (#31701)

Lisa Cawley 7 years ago
parent
commit
ac7fadd336

+ 2 - 0
docs/reference/setup.asciidoc

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

+ 20 - 0
docs/reference/setup/install/deb-init.asciidoc

@@ -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/`.

+ 3 - 20
docs/reference/setup/install/deb.asciidoc

@@ -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[]

+ 0 - 2
docs/reference/setup/install/init-systemd.asciidoc

@@ -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

+ 16 - 0
docs/reference/setup/install/msi-windows-start.asciidoc

@@ -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 - 0
docs/reference/setup/install/rpm-init.asciidoc

@@ -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/`.

+ 3 - 21
docs/reference/setup/install/rpm.asciidoc

@@ -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[]

+ 1 - 17
docs/reference/setup/install/windows.asciidoc

@@ -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

+ 21 - 0
docs/reference/setup/install/zip-targz-daemon.asciidoc

@@ -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 - 0
docs/reference/setup/install/zip-targz-start.asciidoc

@@ -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.
+

+ 2 - 37
docs/reference/setup/install/zip-targz.asciidoc

@@ -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

+ 11 - 0
docs/reference/setup/install/zip-windows-start.asciidoc

@@ -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`.

+ 1 - 11
docs/reference/setup/install/zip-windows.asciidoc

@@ -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

+ 72 - 0
docs/reference/setup/starting.asciidoc

@@ -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[]