-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Starting Elasticsearch (#31701)
- Loading branch information
Showing
14 changed files
with
189 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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[] |