targz.asciidoc 5.8 KB

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