targz.asciidoc 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. [[targz]]
  2. === Install {es} from archive on Linux or MacOS
  3. {es} is available as a `.tar.gz` archive for Linux and MacOS.
  4. include::license.asciidoc[]
  5. The latest stable version of {es} can be found on the
  6. link:/downloads/elasticsearch[Download {es}] page.
  7. Other versions can be found on the
  8. link:/downloads/past-releases[Past Releases page].
  9. NOTE: {es} includes a bundled version of https://openjdk.java.net[OpenJDK]
  10. from the JDK maintainers (GPLv2+CE). To use your own version of Java,
  11. see the <<jvm-version, JVM version requirements>>
  12. [[install-linux]]
  13. ==== Download and install archive for Linux
  14. ifeval::["{release-state}"=="unreleased"]
  15. Version {version} of {es} has not yet been released.
  16. endif::[]
  17. ifeval::["{release-state}"!="unreleased"]
  18. The Linux archive for {es} v{version} can be downloaded and installed as follows:
  19. ["source","sh",subs="attributes"]
  20. --------------------------------------------
  21. wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz
  22. wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz.sha512
  23. shasum -a 512 -c elasticsearch-{version}-linux-x86_64.tar.gz.sha512 <1>
  24. tar -xzf elasticsearch-{version}-linux-x86_64.tar.gz
  25. cd elasticsearch-{version}/ <2>
  26. --------------------------------------------
  27. <1> Compares the SHA of the downloaded `.tar.gz` archive and the published checksum, which should output
  28. `elasticsearch-{version}-linux-x86_64.tar.gz: OK`.
  29. <2> This directory is known as `$ES_HOME`.
  30. endif::[]
  31. [[install-macos]]
  32. ==== Download and install archive for MacOS
  33. ifeval::["{release-state}"=="unreleased"]
  34. Version {version} of {es} has not yet been released.
  35. endif::[]
  36. ifeval::["{release-state}"!="unreleased"]
  37. The MacOS archive for {es} v{version} can be downloaded and installed as follows:
  38. ["source","sh",subs="attributes"]
  39. --------------------------------------------
  40. curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-darwin-x86_64.tar.gz
  41. curl https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-darwin-x86_64.tar.gz.sha512 | shasum -a 512 -c - <1>
  42. tar -xzf elasticsearch-{version}-darwin-x86_64.tar.gz
  43. cd elasticsearch-{version}/ <2>
  44. --------------------------------------------
  45. // NOTCONSOLE
  46. <1> Compares the SHA of the downloaded `.tar.gz` archive and the published checksum, which should output
  47. `elasticsearch-{version}-darwin-x86_64.tar.gz: OK`.
  48. <2> This directory is known as `$ES_HOME`.
  49. endif::[]
  50. ifdef::include-xpack[]
  51. [role="xpack"]
  52. [[targz-enable-indices]]
  53. ==== Enable automatic creation of system indices
  54. include::xpack-indices.asciidoc[]
  55. endif::include-xpack[]
  56. [[targz-running]]
  57. include::targz-start.asciidoc[]
  58. :es-conf: $ES_HOME/config
  59. :slash: /
  60. include::check-running.asciidoc[]
  61. Log printing to `stdout` can be disabled using the `-q` or `--quiet`
  62. option on the command line.
  63. [[setup-installation-daemon]]
  64. include::targz-daemon.asciidoc[]
  65. [[targz-configuring]]
  66. ==== Configure {es} on the command line
  67. {es} loads its configuration from the `$ES_HOME/config/elasticsearch.yml`
  68. file by default. The format of this config file is explained in
  69. <<settings>>.
  70. Any settings that can be specified in the config file can also be specified on
  71. the command line, using the `-E` syntax as follows:
  72. [source,sh]
  73. --------------------------------------------
  74. ./bin/elasticsearch -d -Ecluster.name=my_cluster -Enode.name=node_1
  75. --------------------------------------------
  76. TIP: Typically, any cluster-wide settings (like `cluster.name`) should be
  77. added to the `elasticsearch.yml` config file, while any node-specific settings
  78. such as `node.name` could be specified on the command line.
  79. include::connect-clients.asciidoc[]
  80. [[targz-layout]]
  81. ==== Directory layout of archives
  82. The archive distributions are entirely self-contained. All files and
  83. directories are, by default, contained within `$ES_HOME` -- the directory
  84. created when unpacking the archive.
  85. This is very convenient because you don't have to create any directories to
  86. start using {es}, and uninstalling {es} is as easy as
  87. removing the `$ES_HOME` directory. However, it is advisable to change the
  88. default locations of the config directory, the data directory, and the logs
  89. directory so that you do not delete important data later on.
  90. [cols="<h,<,<m,<m",options="header",]
  91. |=======================================================================
  92. | Type | Description | Default Location | Setting
  93. | home
  94. | {es} home directory or `$ES_HOME`
  95. d| Directory created by unpacking the archive
  96. |
  97. | bin
  98. | Binary scripts including `elasticsearch` to start a node
  99. and `elasticsearch-plugin` to install plugins
  100. | $ES_HOME/bin
  101. d|
  102. | conf
  103. | Configuration files including `elasticsearch.yml`
  104. | $ES_HOME/config
  105. | <<config-files-location,ES_PATH_CONF>>
  106. | conf
  107. | Generated TLS keys and certificates for the transport and HTTP layer.
  108. | $ES_HOME/config/certs
  109. d|
  110. | data
  111. | The location of the data files of each index / shard allocated
  112. on the node.
  113. | $ES_HOME/data
  114. | path.data
  115. | logs
  116. | Log files location.
  117. | $ES_HOME/logs
  118. | path.logs
  119. | plugins
  120. | Plugin files location. Each plugin will be contained in a subdirectory.
  121. | $ES_HOME/plugins
  122. |
  123. | repo
  124. | Shared file system repository locations. Can hold multiple locations. A file system repository can be placed in to any subdirectory of any directory specified here.
  125. d| Not configured
  126. | path.repo
  127. |=======================================================================
  128. include::security-files-reference.asciidoc[]
  129. include::next-steps.asciidoc[]