Skip to content

Commit 45adbff

Browse files
updated debian install instructions for if openjdk 19 gets installed … (#714)
Cherry-picked from #700 Also added RHEL 8.8 to compatible OSs. --------- Co-authored-by: Jenny Owen <[email protected]>
1 parent 85622bd commit 45adbff

File tree

2 files changed

+55
-16
lines changed

2 files changed

+55
-16
lines changed

modules/ROOT/pages/installation/linux/debian.adoc

Lines changed: 54 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Neo4j {neo4j-version} requires the Java 17 runtime.
1111
Java 17 is not included in Ubuntu 16.04 LTS and will have to be set up manually prior to installing or upgrading to Neo4j {neo4j-version}, as described below.
1212
Debian 11 and Ubuntu 18.04 onwards already have the OpenJDK Java 17 package available through `apt`.
1313

14+
[[debian-prerequisites-notopenjdk]]
1415
=== Oracle JDK, Zulu JDK, or Corretto JDK
1516

1617
If you wish to use a non-default JDK, it must be installed prior to starting the Neo4j installation.
@@ -44,7 +45,7 @@ See xref:installation/linux/debian.adoc#multiple-java-versions[Dealing with mult
4445
It is important that you configure your default Java version to point to Java 17, or Neo4j {neo4j-version-exact} will be unable to start.
4546
Do so with the `update-java-alternatives` command.
4647

47-
* First list all your installed versions of Java with `update-java-alternatives --list`
48+
. List all your installed versions of Java with `update-java-alternatives --list`.
4849
+
4950
Your results may vary, but this is an example of the output:
5051
+
@@ -54,21 +55,58 @@ java-1.17.0-openjdk-amd64 1711 /usr/lib/jvm/java-1.17.0-openjdk-amd64
5455
java-1.11.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.11.0-openjdk-amd64
5556
----
5657

57-
* Identify your Java 17 version, in this case, it is `java-1.17.0-openjdk-amd64`.
58-
Then set it as the default with (replacing `<java17name>` with the appropriate name from above):
58+
. Identify your Java 17 version:
5959
+
6060
[source, shell]
6161
----
62-
sudo update-java-alternatives --jre --set <java17name>
62+
java -version
6363
----
64+
+
65+
In this case, it is `java-1.17.0-openjdk-amd64`.
6466

65-
* Finally, confirm which version of Java is the default:
67+
. Set it as the default by replacing `<java17name>` with its name:
6668
+
6769
[source, shell]
6870
----
69-
java -version
71+
sudo update-java-alternatives --jre --set <java17name>
72+
----
73+
74+
. Confirm which version of Java is the default using `java -version` again.
75+
76+
[[debian-install-newer-java]]
77+
=== If `apt` installed OpenJDK 19
78+
79+
On newer Debian or Ubuntu operating systems, Java 19 is available by default, and `apt` may have installed OpenJDK 19, *even if Java 17 was already installed*.
80+
81+
If this happens, you will see this warning on Neo4j start:
82+
[output]
83+
----
84+
WARNING! You are using an unsupported Java runtime.
85+
* Please use Oracle(R) Java(TM) 17, OpenJDK(TM) 17 to run Neo4j.
86+
* Please see https://neo4j.com/docs/ for Neo4j installation instructions.
7087
----
7188

89+
To fix this, you can install Java 17 manually, uninstall OpenJDK 19, or set Java 17 as the default.
90+
91+
* Install OpenJDK 17 manually:
92+
+
93+
[source, shell, subs="attributes"]
94+
----
95+
sudo apt install openjdk-17-jre
96+
----
97+
+
98+
For other distributions of Java 17, see
99+
xref:installation/linux/debian.adoc#debian-prerequisites-notopenjdk[instructions for setting up java pre-requisites].
100+
101+
* Uninstall OpenJDK 19:
102+
+
103+
[source, shell, subs="attributes"]
104+
----
105+
sudo apt remove openjdk-19-jre-headless
106+
----
107+
108+
* Alternatively, if you want to keep OpenJDK 19 installed, follow the instructions in the section for
109+
xref:installation/linux/debian.adoc#multiple-java-versions[Dealing with multiple installed Java versions] to set Java 17 as the default java version.
72110

73111
[[debian-installation]]
74112
== Installation
@@ -79,7 +117,7 @@ java -version
79117

80118
The Debian package is available from https://debian.neo4j.com.
81119

82-
* To use the repository for generally available versions of Neo4j, run:
120+
. To use the repository for generally available versions of Neo4j, run:
83121
+
84122
[source, shell]
85123
----
@@ -100,7 +138,7 @@ echo 'deb https://debian.neo4j.com stable {neo4j-version}' | sudo tee -a /etc/ap
100138
sudo apt-get update
101139
----
102140

103-
* Once the repository has been added into `apt`, you can verify which Neo4j versions are available by running:
141+
. Once the repository has been added to `apt`, you can verify which Neo4j versions are available by running:
104142
+
105143
[source, shell]
106144
----
@@ -109,7 +147,7 @@ apt list -a neo4j
109147
+
110148
[NOTE]
111149
====
112-
In Ubuntu server installations you will also need to make sure that the `universe` repository is enabled.
150+
In Ubuntu server installations, you also need to make sure that the `universe` repository is enabled.
113151
If the `universe` repository is not present, the Neo4j installation will fail with the error `Depends: daemon but it is not installable`.
114152
115153
This can be fixed by running the command:
@@ -123,21 +161,23 @@ sudo add-apt-repository universe
123161
[[debian-install]]
124162
=== Install Neo4j
125163

126-
To install Neo4j Community Edition:
164+
To install Neo4j, run one of the following commands depending on which version you want to install:
127165

166+
* Neo4j Community Edition:
167+
+
128168
[source, shell, subs="attributes"]
129169
----
130170
sudo apt-get install neo4j=1:{neo4j-version-exact}
131171
----
132172

133-
To install Neo4j Enterprise Edition:
134-
173+
* Neo4j Enterprise Edition:
174+
+
135175
[source, shell, subs="attributes"]
136176
----
137177
sudo apt-get install neo4j-enterprise=1:{neo4j-version-exact}
138178
----
139179

140-
Note that the version includes an epoch version component (`1:`), in accordance with the https://www.debian.org/doc/debian-policy/#s-f-version[Debian policy on versioning].
180+
Note that the version includes an epoch version component (`1:`), following the https://www.debian.org/doc/debian-policy/#s-f-version[Debian policy on versioning].
141181

142182
When installing Neo4j Enterprise Edition, you will be prompted to accept the license agreement.
143183
Once the license agreement is accepted installation begins.
@@ -150,7 +190,6 @@ To forget the stored answer, and trigger the license agreement prompt on subsequ
150190
echo purge | sudo debconf-communicate neo4j-enterprise
151191
----
152192

153-
154193
[role=enterprise-edition]
155194
==== Non-interactive installation of Neo4j Enterprise Edition
156195

@@ -247,7 +286,7 @@ On Debian-based distributions, Neo4j is enabled to start automatically on system
247286
Before starting up the database for the first time, it is recommended to use the `set-initial-password` command of `neo4j-admin` to define the password for the native user `neo4j`.
248287
249288
If the password is not set explicitly using this method, it will be set to the default password `neo4j`.
250-
In that case, you will be prompted to change the default password at first login.
289+
In that case, you will be prompted to change the default password at first login.
251290
252291
For more information, see xref:configuration/set-initial-password.adoc[].
253292
====

modules/ROOT/pages/installation/requirements.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ For cloud environments, and server-based, on-premise environments:
101101
| *Amazon Linux 2022 AMI* | Amazon Corretto 17, and OracleJDK 17
102102
| *CentOS Stream 8, 9* | OpenJDK 17, OracleJDK 17, and ZuluJDK 17
103103
| *Debian 11* | OpenJDK 17, OracleJDK 17, and ZuluJDK 17
104-
| *Red Hat Enterprise Linux Server 8.4, 8.6, 9.0* | Red Hat OpenJDK 17, Oracle JDK 17, and ZuluJDK 17
104+
| *Red Hat Enterprise Linux Server 8.6, 8.8, 9.0* | Red Hat OpenJDK 17, Oracle JDK 17, and ZuluJDK 17
105105
| *Ubuntu Server 16.04, 18.04, 20.04, 22.04* | OpenJDK 17, OracleJDK 17, and ZuluJDK 17
106106
| *Windows Server 2016, 2019, 2022* | OracleJDK 17, ZuluJDK 17
107107
|===

0 commit comments

Comments
 (0)