targz.asciidoc 5.4 KB

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