setup.asciidoc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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 `-D` or getopt long style
  54. configuration parameters directly to the script. When set, all override
  55. anything set using either `JAVA_OPTS` or `ES_JAVA_OPTS`. For example:
  56. [source,sh]
  57. --------------------------------------------------
  58. $ bin/elasticsearch -Des.index.refresh_interval=5s --node.name=my-node
  59. --------------------------------------------------
  60. *************************************************************************
  61. [float]
  62. [[jvm-version]]
  63. == Java (JVM) version
  64. Elasticsearch is built using Java, and requires at least
  65. http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java 8] in
  66. order to run. Only Oracle's Java and the OpenJDK are supported. The same JVM
  67. version should be used on all Elasticsearch nodes and clients.
  68. We recommend installing the *Java 8 update 20 or later*.
  69. Elasticsearch will refuse to start if a known-bad version of Java is used.
  70. The version of Java to use can be configured by setting the `JAVA_HOME`
  71. environment variable.
  72. --
  73. include::setup/configuration.asciidoc[]
  74. include::setup/as-a-service.asciidoc[]
  75. include::setup/as-a-service-win.asciidoc[]
  76. include::setup/dir-layout.asciidoc[]
  77. include::setup/repositories.asciidoc[]
  78. include::setup/upgrade.asciidoc[]