Skip to content

Commit d96e71d

Browse files
rjernstjasontedor
authored andcommitted
Add docs for bundled jdk (#40487)
This commit changes the note in docs about required java version to note the existence of the bundled jdk and how to bring your own java. It also reorganizes the zip/targz docs as zip is no longer suitable on Linux/MacOS.
1 parent 789806f commit d96e71d

13 files changed

+87
-88
lines changed

docs/reference/getting-started.asciidoc

+13-14
Original file line numberDiff line numberDiff line change
@@ -114,34 +114,33 @@ https://www.elastic.co/cloud/elasticsearch-service/signup[Try out the
114114
Elasticsearch Service for free].
115115
==============
116116

117-
Elasticsearch requires at least Java 8. Specifically as of this writing, it is recommended that you use the Oracle JDK version {jdk}. Java installation varies from platform to platform so we won't go into those details here. Oracle's recommended installation documentation can be found on http://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html[Oracle's website]. Suffice to say, before you install Elasticsearch, please check your Java version first by running (and then install/upgrade accordingly if needed):
117+
NOTE: Elasticsearch includes a bundled version of http://openjdk.java.net[OpenJDK]
118+
from the JDK maintainers (GPLv2+CE). To use your own version of Java,
119+
see the <<jvm-version, JVM version requirements>>
118120

119-
[source,sh]
120-
--------------------------------------------------
121-
java -version
122-
echo $JAVA_HOME
123-
--------------------------------------------------
124-
125-
Once we have Java set up, we can then download and run Elasticsearch. The binaries are available from http://www.elastic.co/downloads[`www.elastic.co/downloads`] along with all the releases that have been made in the past. For each release, you have a choice among a `zip` or `tar` archive, a `DEB` or `RPM` package, or a Windows `MSI` installation package.
121+
The binaries are available from http://www.elastic.co/downloads[`www.elastic.co/downloads`]
122+
along with all the releases that have been made in the past. For each release, platform
123+
dependent archive versions are available for Windows, Linux and MacOS, as well as `DEB` and `RPM`
124+
packages for Linux, and `MSI` installation packages for Windows.
126125

127126
[float]
128-
=== Installation example with tar
127+
=== Installation example on Linux
129128

130-
For simplicity, let's use the {ref}/zip-targz.html[tar] file.
129+
For simplicity, let's use the {ref}/targz.html[tar] file.
131130

132-
Let's download the Elasticsearch {version} tar as follows:
131+
Let's download the Elasticsearch {version} Linux tar as follows:
133132

134133
["source","sh",subs="attributes,callouts"]
135134
--------------------------------------------------
136-
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}.tar.gz
135+
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz
137136
--------------------------------------------------
138137
// NOTCONSOLE
139138

140139
Then extract it as follows:
141140

142141
["source","sh",subs="attributes,callouts"]
143142
--------------------------------------------------
144-
tar -xvf elasticsearch-{version}.tar.gz
143+
tar -xvf elasticsearch-{version}-linux-x86_64.tar.gz
145144
--------------------------------------------------
146145

147146
It will then create a bunch of files and folders in your current directory. We then go into the bin directory as follows:
@@ -172,7 +171,7 @@ Then double-click the downloaded file to launch the GUI. Within the first screen
172171
image::images/msi_installer/msi_installer_locations.png[]
173172

174173
Then select whether to install as a service or start Elasticsearch manually as needed.
175-
To align with the tar example, choose not to install as a service:
174+
To align with the Linux example, choose not to install as a service:
176175

177176
[[getting-started-msi-installer-service]]
178177
image::images/msi_installer/msi_installer_no_service.png[]

docs/reference/setup.asciidoc

+10-11
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,19 @@ platforms, but it is possible that it will work on other platforms too.
2323
[[jvm-version]]
2424
== Java (JVM) Version
2525

26-
Elasticsearch is built using Java, and requires at least
27-
http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java {jdk_major}]
28-
in order to run. Only Oracle's Java and the OpenJDK are supported. The same JVM
29-
version should be used on all Elasticsearch nodes and clients.
30-
31-
We recommend installing Java version *{jdk} or a later version in the Java
32-
{jdk_major} release series*. We recommend using a
33-
link:/support/matrix[supported]
26+
Elasticsearch is built using Java, and includes a bundled version of
27+
http://openjdk.java.net[OpenJDK] from the JDK maintainers (GPLv2+CE)
28+
within each distribution. The bundled JVM exists within the `jdk` directory of
29+
the Elasticsearch home directory.
30+
31+
To use your own version of Java, set the `JAVA_HOME` environment variable.
32+
When using your own version, the bundled JVM directory may be removed.
33+
If not using the bundled JVM, we recommend installing Java version
34+
*{jdk} or a later version in the Java {jdk_major} release series*. We recommend
35+
using a link:/support/matrix[supported]
3436
http://www.oracle.com/technetwork/java/eol-135779.html[LTS version of Java].
3537
Elasticsearch will refuse to start if a known-bad version of Java is used.
3638

37-
The version of Java that Elasticsearch will use can be configured by setting
38-
the `JAVA_HOME` environment variable.
39-
4039
--
4140

4241
include::setup/install.asciidoc[]

docs/reference/setup/important-settings/error-file.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ By default, Elasticsearch configures the JVM to write fatal error logs
55
to the default logging directory (this is `/var/log/elasticsearch` for
66
the <<rpm,RPM>> and <<deb,Debian>> package distributions, and the `logs`
77
directory under the root of the Elasticsearch installation for the
8-
<<zip-targz,tar and zip>> archive distributions). These are logs
8+
<<targz,tar>> and <<zip-windows,zip>> archive distributions). These are logs
99
produced by the JVM when it encounters a fatal error (e.g., a
1010
segmentation fault). If this path is not suitable for receiving logs,
1111
you should modify the entry `-XX:ErrorFile=...` in

docs/reference/setup/important-settings/heap-dump-path.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ By default, Elasticsearch configures the JVM to dump the heap on out of
55
memory exceptions to the default data directory (this is
66
`/var/lib/elasticsearch` for the <<rpm,RPM>> and <<deb,Debian>> package
77
distributions, and the `data` directory under the root of the
8-
Elasticsearch installation for the <<zip-targz,tar and zip>> archive
8+
Elasticsearch installation for the <<targz,tar>> and <<zip-windows,zip>> archive
99
distributions). If this path is not suitable for receiving heap dumps,
1010
you should modify the entry `-XX:HeapDumpPath=...` in
1111
<<jvm-options,`jvm.options`>>. If you specify a directory, the JVM

docs/reference/setup/install.asciidoc

+10-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ Elasticsearch Service for free].
1616
Elasticsearch is provided in the following package formats:
1717

1818
[horizontal]
19-
`zip`/`tar.gz`::
19+
Linux and MacOS `tar.gz` archives::
2020

21-
The `zip` and `tar.gz` packages are suitable for installation on any system
22-
and are the easiest choice for getting started with Elasticsearch on most systems.
21+
The `tar.gz` archives are available for installation on any Linux distribution and MacOS.
2322
+
24-
<<zip-targz>> or <<zip-windows>>
23+
<<targz>>
24+
25+
Windows `.zip` archive::
26+
27+
The `zip` archive is suitable for installation on Windows.
28+
+
29+
<<zip-windows>>
2530

2631
`deb`::
2732

@@ -69,7 +74,7 @@ Chef:: https://github.com/elastic/cookbook-elasticsearch[cookbook-elasticsearc
6974
Ansible:: https://github.com/elastic/ansible-elasticsearch[ansible-elasticsearch]
7075

7176

72-
include::install/zip-targz.asciidoc[]
77+
include::install/targz.asciidoc[]
7378

7479
include::install/zip-windows.asciidoc[]
7580

docs/reference/setup/install/deb.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ The latest stable version of Elasticsearch can be found on the
1111
link:/downloads/elasticsearch[Download Elasticsearch] page. Other versions can
1212
be found on the link:/downloads/past-releases[Past Releases page].
1313

14-
NOTE: Elasticsearch requires Java 8 or later. Use the
15-
http://www.oracle.com/technetwork/java/javase/downloads/index.html[official Oracle distribution]
16-
or an open-source distribution such as http://openjdk.java.net[OpenJDK].
14+
NOTE: Elasticsearch includes a bundled version of http://openjdk.java.net[OpenJDK]
15+
from the JDK maintainers (GPLv2+CE). To use your own version of Java,
16+
see the <<jvm-version, JVM version requirements>>
1717

1818
[[deb-key]]
1919
==== Import the Elasticsearch PGP Key

docs/reference/setup/install/rpm.asciidoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ Elasticsearch on any RPM-based system such as OpenSuSE, SLES, Centos, Red Hat,
77
and Oracle Enterprise.
88

99
NOTE: RPM install is not supported on distributions with old versions of RPM,
10-
such as SLES 11 and CentOS 5. Please see <<zip-targz>> instead.
10+
such as SLES 11 and CentOS 5. Please see <<targz>> instead.
1111

1212
include::license.asciidoc[]
1313

1414
The latest stable version of Elasticsearch can be found on the
1515
link:/downloads/elasticsearch[Download Elasticsearch] page. Other versions can
1616
be found on the link:/downloads/past-releases[Past Releases page].
1717

18-
NOTE: Elasticsearch requires Java 8 or later. Use the
19-
http://www.oracle.com/technetwork/java/javase/downloads/index.html[official Oracle distribution]
20-
or an open-source distribution such as http://openjdk.java.net[OpenJDK].
18+
NOTE: Elasticsearch includes a bundled version of http://openjdk.java.net[OpenJDK]
19+
from the JDK maintainers (GPLv2+CE). To use your own version of Java,
20+
see the <<jvm-version, JVM version requirements>>
2121

2222
[[rpm-key]]
2323
==== Import the Elasticsearch PGP Key

docs/reference/setup/install/zip-targz.asciidoc renamed to docs/reference/setup/install/targz.asciidoc

+35-39
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
[[zip-targz]]
2-
=== Install Elasticsearch with `.zip` or `.tar.gz`
1+
[[targz]]
2+
=== Install Elasticsearch from archive on Linux or MacOS
33

4-
Elasticsearch is provided as a `.zip` and as a `.tar.gz` package. These
5-
packages can be used to install Elasticsearch on any system and are the
6-
easiest package format to use when trying out Elasticsearch.
4+
Elasticsearch is as a `.tar.gz` archive for Linux and MacOS.
75

86
include::license.asciidoc[]
97

@@ -12,12 +10,12 @@ link:/downloads/elasticsearch[Download Elasticsearch] page.
1210
Other versions can be found on the
1311
link:/downloads/past-releases[Past Releases page].
1412

15-
NOTE: Elasticsearch requires Java 8 or later. Use the
16-
http://www.oracle.com/technetwork/java/javase/downloads/index.html[official Oracle distribution]
17-
or an open-source distribution such as http://openjdk.java.net[OpenJDK].
13+
NOTE: Elasticsearch includes a bundled version of http://openjdk.java.net[OpenJDK]
14+
from the JDK maintainers (GPLv2+CE). To use your own version of Java,
15+
see the <<jvm-version, JVM version requirements>>
1816

19-
[[install-zip]]
20-
==== Download and install the `.zip` package
17+
[[install-linux]]
18+
==== Download and install archive for Linux
2119

2220
ifeval::["{release-state}"=="unreleased"]
2321

@@ -27,30 +25,28 @@ endif::[]
2725

2826
ifeval::["{release-state}"!="unreleased"]
2927

30-
The `.zip` archive for Elasticsearch v{version} can be downloaded and installed as follows:
31-
28+
The Linux archive for Elasticsearch v{version} can be downloaded and installed as follows:
3229

3330
["source","sh",subs="attributes"]
3431
--------------------------------------------
35-
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-windows-x86_64.zip
36-
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-windows-x86_64.zip.sha512
37-
shasum -a 512 -c elasticsearch-{version}-windows-x86_64.zip.sha512 <1>
38-
unzip elasticsearch-{version}-windows-x86_64.zip
32+
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz
33+
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz.sha512
34+
shasum -a 512 -c elasticsearch-{version}-linux-x86_64.tar.gz.sha512 <1>
35+
tar -xzf elasticsearch-{version}-linux-x86_64.tar.gz
3936
cd elasticsearch-{version}/ <2>
4037
--------------------------------------------
41-
<1> Compares the SHA of the downloaded `.zip` archive and the published checksum, which should output
42-
`elasticsearch-{version}-windows-x86_64.zip: OK`.
38+
<1> Compares the SHA of the downloaded `.tar.gz` archive and the published checksum, which should output
39+
`elasticsearch-{version}-linux-x86_64.tar.gz: OK`.
4340
<2> This directory is known as `$ES_HOME`.
4441

45-
Alternatively, you can download the following package, which contains only
46-
features that are available under the Apache 2.0 license:
47-
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-{version}-windows-x86_64.zip
42+
Alternatively, you can download the following package, which includes only
43+
Apache 2.0 licensed code:
44+
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-{version}-linux-x86_64.tar.gz
4845

4946
endif::[]
5047

51-
52-
[[install-targz]]
53-
==== Download and install the `.tar.gz` package
48+
[[install-macos]]
49+
==== Download and install archive for MacOS
5450

5551
ifeval::["{release-state}"=="unreleased"]
5652

@@ -60,47 +56,47 @@ endif::[]
6056

6157
ifeval::["{release-state}"!="unreleased"]
6258

63-
The `.tar.gz` archive for Elasticsearch v{version} can be downloaded and installed as follows:
59+
The MacOS archive for Elasticsearch v{version} can be downloaded and installed as follows:
6460

6561
["source","sh",subs="attributes"]
6662
--------------------------------------------
67-
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz
68-
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz.sha512
69-
shasum -a 512 -c elasticsearch-{version}-linux-x86_64.tar.gz.sha512 <1>
70-
tar -xzf elasticsearch-{version}-linux-x86_64.tar.gz
63+
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-darwin-x86_64.tar.gz
64+
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-darwin-x86_64.tar.gz.sha512
65+
shasum -a 512 -c elasticsearch-{version}-darwin-x86_64.tar.gz.sha512 <1>
66+
tar -xzf elasticsearch-{version}-darwin-x86_64.tar.gz
7167
cd elasticsearch-{version}/ <2>
7268
--------------------------------------------
7369
<1> Compares the SHA of the downloaded `.tar.gz` archive and the published checksum, which should output
74-
`elasticsearch-{version}-linux-x86_64.tar.gz: OK`.
70+
`elasticsearch-{version}-darwin-x86_64.tar.gz: OK`.
7571
<2> This directory is known as `$ES_HOME`.
7672

7773
Alternatively, you can download the following package, which includes only
7874
Apache 2.0 licensed code:
79-
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-{version}-linux-x86_64.tar.gz
75+
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-{version}-darwin-x86_64.tar.gz
8076

8177
endif::[]
8278

8379
ifdef::include-xpack[]
84-
[[zip-targz-enable-indices]]
80+
[[targz-enable-indices]]
8581
==== Enable automatic creation of {xpack} indices
8682

8783
{xpack} will try to automatically create a number of indices within {es}.
8884
include::xpack-indices.asciidoc[]
8985

9086
endif::include-xpack[]
9187

92-
[[zip-targz-running]]
93-
include::zip-targz-start.asciidoc[]
88+
[[targz-running]]
89+
include::targz-start.asciidoc[]
9490

9591
include::check-running.asciidoc[]
9692

9793
Log printing to `stdout` can be disabled using the `-q` or `--quiet`
9894
option on the command line.
9995

10096
[[setup-installation-daemon]]
101-
include::zip-targz-daemon.asciidoc[]
97+
include::targz-daemon.asciidoc[]
10298

103-
[[zip-targz-configuring]]
99+
[[targz-configuring]]
104100
==== Configuring Elasticsearch on the command line
105101

106102
Elasticsearch loads its configuration from the `$ES_HOME/config/elasticsearch.yml`
@@ -119,10 +115,10 @@ TIP: Typically, any cluster-wide settings (like `cluster.name`) should be
119115
added to the `elasticsearch.yml` config file, while any node-specific settings
120116
such as `node.name` could be specified on the command line.
121117

122-
[[zip-targz-layout]]
123-
==== Directory layout of `.zip` and `.tar.gz` archives
118+
[[targz-layout]]
119+
==== Directory layout of archives
124120

125-
The `.zip` and `.tar.gz` packages are entirely self-contained. All files and
121+
The archive distributions are entirely self-contained. All files and
126122
directories are, by default, contained within `$ES_HOME` -- the directory
127123
created when unpacking the archive.
128124

docs/reference/setup/install/windows.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ link:/downloads/elasticsearch[Download Elasticsearch] page.
1717
Other versions can be found on the
1818
link:/downloads/past-releases[Past Releases page].
1919

20-
NOTE: Elasticsearch requires Java 8 or later. Use the
21-
http://www.oracle.com/technetwork/java/javase/downloads/index.html[official Oracle distribution]
22-
or an open-source distribution such as http://openjdk.java.net[OpenJDK].
20+
NOTE: Elasticsearch includes a bundled version of http://openjdk.java.net[OpenJDK]
21+
from the JDK maintainers (GPLv2+CE). To use your own version of Java,
22+
see the <<jvm-version, JVM version requirements>>
2323

2424
[[download-msi]]
2525
==== Download the `.msi` package

docs/reference/setup/install/zip-windows.asciidoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[zip-windows]]
22
=== Install Elasticsearch with `.zip` on Windows
33

4-
Elasticsearch can be installed on Windows using the `.zip` package. This
4+
Elasticsearch can be installed on Windows using the Windows `.zip` archive. This
55
comes with a `elasticsearch-service.bat` command which will setup Elasticsearch to run as a
66
service.
77

@@ -16,9 +16,9 @@ link:/downloads/elasticsearch[Download Elasticsearch] page.
1616
Other versions can be found on the
1717
link:/downloads/past-releases[Past Releases page].
1818

19-
NOTE: Elasticsearch requires Java 8 or later. Use the
20-
http://www.oracle.com/technetwork/java/javase/downloads/index.html[official Oracle distribution]
21-
or an open-source distribution such as http://openjdk.java.net[OpenJDK].
19+
NOTE: Elasticsearch includes a bundled version of http://openjdk.java.net[OpenJDK]
20+
from the JDK maintainers (GPLv2+CE). To use your own version of Java,
21+
see the <<jvm-version, JVM version requirements>>
2222

2323
[[install-windows]]
2424
==== Download and install the `.zip` package

docs/reference/setup/starting.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ If you installed {es} with a `.tar.gz` package, you can start {es} from the
1111
command line.
1212

1313
[float]
14-
include::install/zip-targz-start.asciidoc[]
14+
include::install/targz-start.asciidoc[]
1515

1616
[float]
17-
include::install/zip-targz-daemon.asciidoc[]
17+
include::install/targz-daemon.asciidoc[]
1818

1919
[float]
2020
[[start-zip]]
@@ -69,4 +69,4 @@ include::install/init-systemd.asciidoc[]
6969
include::install/rpm-init.asciidoc[]
7070

7171
[float]
72-
include::install/systemd.asciidoc[]
72+
include::install/systemd.asciidoc[]

0 commit comments

Comments
 (0)