zip-targz.asciidoc 6.0 KB

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