setup.asciidoc 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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.elasticsearch.org/download[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. [[setup-installation]]
  11. [float]
  12. == Installation
  13. After link:/download[downloading] the latest release and extracting it,
  14. *elasticsearch* can be started using:
  15. [source,sh]
  16. --------------------------------------------------
  17. $ bin/elasticsearch
  18. --------------------------------------------------
  19. Under *nix system, the command will start the process in the foreground.
  20. To run it in the background, add the `-d` switch to it:
  21. [source,sh]
  22. --------------------------------------------------
  23. $ bin/elasticsearch -d
  24. --------------------------------------------------
  25. .*NIX
  26. *************************************************************************
  27. There are added features when using the `elasticsearch` shell script.
  28. The first, which was explained earlier, is the ability to easily run the
  29. process either in the foreground or the background.
  30. Another feature is the ability to pass `-X` and `-D` or getopt long style
  31. configuration parameters directly to the script. When set, all override
  32. anything set using either `JAVA_OPTS` or `ES_JAVA_OPTS`. For example:
  33. [source,sh]
  34. --------------------------------------------------
  35. $ bin/elasticsearch -Xmx2g -Xms2g -Des.index.store.type=memory --node.name=my-node
  36. --------------------------------------------------
  37. *************************************************************************
  38. [float]
  39. [[jvm-version]]
  40. == Java (JVM) version
  41. Elasticsearch is built using Java, and requires at least
  42. http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java 7] in
  43. order to run. Only Oracle's Java and the OpenJDK are supported. The same JVM
  44. version should be used on all Elasticsearch nodes and clients.
  45. We recommend installing the *Java 8 update 20 or later*, or *Java 7 update 55
  46. or later*. Previous versions of Java 7 are known to have bugs that can cause
  47. index corruption and data loss.
  48. The version of Java to use can be configured by setting the `JAVA_HOME`
  49. environment variable.
  50. --
  51. include::setup/configuration.asciidoc[]
  52. include::setup/as-a-service.asciidoc[]
  53. include::setup/as-a-service-win.asciidoc[]
  54. include::setup/dir-layout.asciidoc[]
  55. include::setup/repositories.asciidoc[]
  56. include::setup/upgrade.asciidoc[]