Skip to content

Commit c0bfd5c

Browse files
committed
updated install instructions for jdk 21 and new apt/dnf repository branches
1 parent 57e6c28 commit c0bfd5c

File tree

2 files changed

+23
-120
lines changed

2 files changed

+23
-120
lines changed

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

Lines changed: 13 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,28 @@ You can install Neo4j on Debian, and Debian-based distributions like Ubuntu, usi
77
[[debian-prerequisites]]
88
== Java prerequisites
99

10-
Neo4j {neo4j-version} requires the Java 17 runtime.
11-
Java 17 is not included in Ubuntu 16.04 LTS and will have to be set up manually before installing or upgrading to Neo4j {neo4j-version}, as described below.
12-
Debian 11 and Ubuntu 18.04 onwards already have the OpenJDK Java 17 package available through `apt`.
13-
From version 5.14 onwards, Neo4j also supports JDK 21.
10+
Neo4j {neo4j-version} requires the Java 21 runtime.
11+
12+
=== OpenJDK Java 21
13+
Most of our supported Linux distributions have OpenJDK Java 21 available by default.
14+
Consequently, no extra setup is required if you are using OpenJDK Java, the correct Java dependency will be installed by the package manager when installing Neo4j.
1415

1516
[[debian-prerequisites-notopenjdk]]
1617
=== Oracle JDK, Zulu JDK, or Corretto JDK
1718

1819
If you wish to use a non-default JDK, it must be installed before starting the Neo4j installation.
1920
Otherwise, your package manager will install the default Java distribution for your operating system, usually OpenJDK.
2021

21-
Download and installation instructions can be found on the manufacturer's website:
22+
Java download and installation instructions can be found on the manufacturer's website:
2223

2324
* https://www.oracle.com/java/technologies/downloads/[Oracle JDK]
2425
* https://www.azul.com/downloads/?package=jdk[Zulu JDK]
2526
* https://aws.amazon.com/corretto[Amazon Corretto JDK]
2627

27-
28-
[[ubuntu-java17]]
29-
=== OpenJDK 17 on Ubuntu 16.04
30-
31-
Add the official OpenJDK package repository to `apt`:
32-
33-
[source, shell]
34-
----
35-
sudo add-apt-repository -y ppa:openjdk-r/ppa
36-
sudo apt-get update
37-
----
38-
39-
You are now ready to install Neo4j, which will install Java 17 automatically if it is not already installed.
40-
See xref:installation/linux/debian.adoc#multiple-java-versions[Dealing with multiple installed Java versions] to make sure you can start Neo4j after installation.
41-
42-
4328
[[multiple-java-versions]]
4429
=== Dealing with multiple installed Java versions
4530

46-
You must configure your default Java version to point to Java 17, or Neo4j {neo4j-version-exact} will be unable to start.
31+
You must configure your default Java version to point to Java 21, or Neo4j {neo4j-version-exact} will be unable to start.
4732
Do so with the `update-java-alternatives` command.
4833

4934
. List all your installed versions of Java with `update-java-alternatives --list`.
@@ -52,27 +37,20 @@ Your results may vary, but this is an example of the output:
5237
+
5338
[queryresult]
5439
----
40+
java-1.21.0-openjdk-amd64 2111 /usr/lib/jvm/java-1.21.0-openjdk-amd64
5541
java-1.17.0-openjdk-amd64 1711 /usr/lib/jvm/java-1.17.0-openjdk-amd64
56-
java-1.11.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.11.0-openjdk-amd64
5742
----
5843

59-
. Identify your Java 17 version:
60-
+
61-
[source, shell]
62-
----
63-
java -version
64-
----
65-
+
66-
In this case, it is `java-1.17.0-openjdk-amd64`.
44+
. Identify your Java 21 version from the list of installed javas. In this case, it is `java-1.21.0-openjdk-amd64`.
6745

68-
. Set it as the default by replacing `<java17name>` with its name:
46+
. Set java 21 as the default by replacing `<java21name>` with its name:
6947
+
7048
[source, shell]
7149
----
72-
sudo update-java-alternatives --jre --set <java17name>
50+
sudo update-java-alternatives --jre --set <java21name>
7351
----
7452

75-
. Confirm which version of Java is the default using `java -version` again.
53+
. Confirm which version of Java is the default using `java -version`.
7654

7755
[[debian-installation]]
7856
== Installation
@@ -83,7 +61,7 @@ sudo update-java-alternatives --jre --set <java17name>
8361

8462
The Debian package is available from https://debian.neo4j.com.
8563

86-
. To use the repository for generally available versions of Neo4j, run:
64+
. To add the Neo4j repository to the package manager, run the following as a sudo user:
8765
+
8866
[source, shell]
8967
----
@@ -92,18 +70,6 @@ echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.c
9270
sudo apt-get update
9371
----
9472
+
95-
To avoid the risk of the `apt` package manager accidentally forcing a database upgrade, different major and minor releases of Neo4j are also available separately inside the repository.
96-
To install Neo4j this way, specify the major and minor version required, in place of `latest`.
97-
+
98-
The following method for production or business-critical installations is recommended:
99-
+
100-
[source, shell, subs="attributes"]
101-
----
102-
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg
103-
echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable {neo4j-version}' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
104-
sudo apt-get update
105-
----
106-
10773
. Once the repository has been added to `apt`, you can verify which Neo4j versions are available by running:
10874
+
10975
[source, shell]
@@ -167,44 +133,6 @@ If you require non-interactive installation of Neo4j Enterprise Edition, you can
167133
echo "neo4j-enterprise neo4j/accept-license select Accept commercial license" | sudo debconf-set-selections
168134
----
169135

170-
[[debian-install-newer-java]]
171-
=== Verify the Java version
172-
173-
On newer Debian or Ubuntu operating systems, Java 19 is available by default, and `apt` may install OpenJDK 19, *even if you have Java 17 installed*.
174-
175-
If this happens, Neo4j will return the following warning on start:
176-
[output]
177-
----
178-
WARNING! You are using an unsupported Java runtime.
179-
* Please use Oracle(R) Java(TM) 17, OpenJDK(TM) 17 to run Neo4j.
180-
* Please see https://neo4j.com/docs/ for Neo4j installation instructions.
181-
----
182-
183-
To fix this, you can install Java 17 manually and then either uninstall OpenJDK 19 or set Java 17 as the default.
184-
185-
. Run the following command to install OpenJDK 17 manually:
186-
+
187-
[source, shell, subs="attributes"]
188-
----
189-
sudo apt install openjdk-17-jre
190-
----
191-
+
192-
For other distributions of Java 17, see
193-
xref:installation/linux/debian.adoc#debian-prerequisites-notopenjdk[Java prerequisites].
194-
195-
. Choose one of the following options to set it as the default:
196-
+
197-
* Uninstall OpenJDK 19:
198-
+
199-
[source, shell, subs="attributes"]
200-
----
201-
sudo apt remove openjdk-19-jre-headless
202-
----
203-
204-
* If you want to keep OpenJDK 19 installed, set Java 17 as default by following the instructions in
205-
xref:installation/linux/debian.adoc#multiple-java-versions[Dealing with multiple installed Java versions].
206-
207-
208136
[[debian-offline-installation]]
209137
== Offline installation
210138

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

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,13 @@ You can deploy Neo4j on Red Hat, CentOS, Fedora, or Amazon Linux distributions u
77
[[linux-rpm-prerequisites]]
88
== Java prerequisites
99

10-
Neo4j 5.x runs on Java 17, and from Neo4j 5.14, it also supports Java 21.
10+
Neo4j {neo4j-version} requires the Java 21 runtime.
1111

12-
13-
=== OpenJDK Java 17
14-
Most of our supported Linux distributions have OpenJDK Java 17 available by default.
12+
=== OpenJDK Java 21
13+
Most of our supported Linux distributions have OpenJDK Java 21 available by default.
1514
Consequently, no extra setup is required if you are using OpenJDK Java, the correct Java dependency will be installed by the package manager when installing Neo4j.
1615

17-
18-
[[linux-rpm-prerequisites-oracle]]
19-
=== Oracle Java 17
20-
There is some minor setup required for compatibility with Oracle Java 17 because Oracle and OpenJDK provide incompatible RPM packages for Java 17.
21-
22-
You can use an adapter for Oracle Java 17, which must be installed before Neo4j.
23-
The adapter contains no code but stops the package manager from installing OpenJDK 17 as a dependency despite an existing Oracle Java 17 installation.
24-
25-
. Download and install the Oracle Java 17 JDK from the https://www.oracle.com/technetwork/java/javase/downloads/index.html[Oracle website].
26-
. Install the adapter:
27-
+
28-
[source, shell]
29-
----
30-
sudo yum install https://dist.neo4j.org/neo4j-java17-adapter.noarch.rpm
31-
----
32-
+
33-
The SHA-256 of the adapter package can be verified against https://dist.neo4j.org/neo4j-java17-adapter.noarch.rpm.sha256.
34-
35-
=== Zulu JDK 17 or Corretto 17
16+
=== Zulu JDK 21 or Corretto 21
3617

3718
If you want to use a non-default JDK, it must be installed before starting the Neo4j installation.
3819
Otherwise, your package manager will install the default Java distribution for your operating system, usually OpenJDK.
@@ -50,23 +31,23 @@ Installation instructions can be found on the manufacturer's website:
5031
[[linux-rpm-install-standard]]
5132
=== Set up the repository
5233

53-
To use the repository for generally available versions of Neo4j, run the following as `root` to add the repository:
34+
To add the Neo4j repository to the package manager, run the following as a sudo user:
5435

5536
[source, shell, subs="attributes"]
5637
----
5738
rpm --import https://debian.neo4j.com/neotechnology.gpg.key
5839
cat << EOF > /etc/yum.repos.d/neo4j.repo
5940
[neo4j]
6041
name=Neo4j RPM Repository
61-
baseurl=https://yum.neo4j.com/stable/{neo4j-version}
42+
baseurl=https://yum.neo4j.com/stable/latest
6243
enabled=1
6344
gpgcheck=1
6445
EOF
6546
----
6647

6748
[NOTE]
6849
====
69-
If you are upgrading from Neo4j 4.4 or earlier, you may need to clear the package manager cache before Neo4j packages become available:
50+
If you are upgrading from Neo4j 5.x or earlier, you may need to clear the package manager cache before Neo4j packages become available:
7051
7152
`yum clean dbcache`
7253
====
@@ -113,7 +94,7 @@ For SUSE-based distributions, the steps are as follows:
11394
+
11495
[source, shell, subs="attributes"]
11596
----
116-
zypper addrepo --refresh https://yum.neo4j.com/stable/{neo4j-version} neo4j-repository
97+
zypper addrepo --refresh https://yum.neo4j.com/stable/latest neo4j-repository
11798
----
11899

119100
. Install Neo4j as `root` using the following commands depending on which edition you are using:
@@ -177,20 +158,14 @@ curl -O https://dist.neo4j.org/rpm/neo4j-enterprise-{neo4j-version-exact}-1.noar
177158
----
178159

179160
. Manually move the downloaded RPM packages to the offline machine.
180-
Before installing Neo4j, you must manually install the required Java 17 packages.
161+
Before installing Neo4j, you must manually install the required Java 21 packages.
181162
+
182-
[NOTE]
183-
====
184-
If using Oracle Java 17, the same dependency issues apply as with the xref:installation/linux/rpm.adoc#linux-rpm-prerequisites-oracle[Oracle Java prerequisites].
185-
You will need to additionally download and install the Java adaptor described in that section.
186-
====
187163
. Install Neo4j and Cypher Shell as `root` using the following command depending on which edition you are using:
188164
+
189165
[NOTE]
190166
====
191-
If you are upgrading from Neo4j 4.4 or earlier versions of 5.x, due to strict dependencies between Neo4j and Cypher Shell, both packages must be upgraded simultaneously.
167+
If you are upgrading from Neo4j 5.x or earlier, due to strict dependencies between Neo4j and Cypher Shell both packages must be upgraded simultaneously.
192168
This must be one single command, and Neo4j Cypher Shell must be the first package in the command.
193-
For later versions, you can install them separately but still need to install Cypher Shell first.
194169
====
195170
+
196171
* Community Edition

0 commit comments

Comments
 (0)