setup.asciidoc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. [[setup]]
  2. = Setup
  3. [partintro]
  4. --
  5. This section includes information on how to setup *elasticsearch* and
  6. get it running. If you haven't already, http://www.elastic.co/downloads[download] it, and
  7. then check the <<setup-installation,installation>> docs.
  8. NOTE: Elasticsearch can also be installed from our repositories using `apt` or `yum`.
  9. See <<setup-repositories>>.
  10. [[supported-platforms]]
  11. [float]
  12. == Supported platforms
  13. The matrix of officially supported operating systems and JVMs is available here:
  14. link:/support/matrix[Support Matrix]. Elasticsearch is tested on the listed
  15. platforms, but it is possible that it will work on other platforms too.
  16. [[setup-installation]]
  17. [float]
  18. == Installation
  19. After link:/downloads/elasticsearch[downloading] the latest release and extracting it,
  20. *elasticsearch* can be started using:
  21. [source,sh]
  22. --------------------------------------------------
  23. $ bin/elasticsearch
  24. --------------------------------------------------
  25. On *nix systems, the command will start the process in the foreground.
  26. [[setup-installation-daemon]]
  27. [float]
  28. === Running as a daemon
  29. To run it in the background, add the `-d` switch to it:
  30. [source,sh]
  31. --------------------------------------------------
  32. $ bin/elasticsearch -d
  33. --------------------------------------------------
  34. [[setup-installation-pid]]
  35. [float]
  36. === PID
  37. The Elasticsearch process can write its PID to a specified file on startup,
  38. making it easy to shut down the process later on:
  39. [source,sh]
  40. --------------------------------------------------
  41. $ bin/elasticsearch -d -p pid <1>
  42. $ kill `cat pid` <2>
  43. --------------------------------------------------
  44. <1> The PID is written to a file called `pid`.
  45. <2> The `kill` command sends a `TERM` signal to the PID stored in the `pid` file.
  46. NOTE: The startup scripts provided for <<setup-service,Linux>> and <<setup-service-win,Windows>>
  47. take care of starting and stopping the Elasticsearch process for you.
  48. .*NIX
  49. *************************************************************************
  50. There are added features when using the `elasticsearch` shell script.
  51. The first, which was explained earlier, is the ability to easily run the
  52. process either in the foreground or the background.
  53. Another feature is the ability to pass `-E` configuration parameters
  54. directly to the script. For example:
  55. [source,sh]
  56. --------------------------------------------------
  57. $ bin/elasticsearch -Ees.index.refresh_interval=5s -Ees.node.name=my-node
  58. --------------------------------------------------
  59. *************************************************************************
  60. [float]
  61. [[jvm-version]]
  62. == Java (JVM) version
  63. Elasticsearch is built using Java, and requires at least
  64. http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java 8] in
  65. order to run. Only Oracle's Java and the OpenJDK are supported. The same JVM
  66. version should be used on all Elasticsearch nodes and clients.
  67. We recommend installing the *Java 8 update 20 or later*.
  68. Elasticsearch will refuse to start if a known-bad version of Java is used.
  69. The version of Java to use can be configured by setting the `JAVA_HOME`
  70. environment variable.
  71. --
  72. include::setup/configuration.asciidoc[]
  73. include::setup/as-a-service.asciidoc[]
  74. include::setup/as-a-service-win.asciidoc[]
  75. include::setup/dir-layout.asciidoc[]
  76. include::setup/repositories.asciidoc[]
  77. include::setup/upgrade.asciidoc[]