Skip to content

Commit

Permalink
Update the steps for installing Neo4j via a package installer (#1546) (
Browse files Browse the repository at this point in the history
…#1548)

Cherry-picked from #1546
  • Loading branch information
renetapopova authored Apr 11, 2024
1 parent 79d8863 commit cf7372d
Showing 1 changed file with 37 additions and 53 deletions.
90 changes: 37 additions & 53 deletions modules/ROOT/pages/installation/linux/rpm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ You can deploy Neo4j on Red Hat, CentOS, Fedora, or Amazon Linux distributions u
[[linux-rpm-prerequisites]]
== Java prerequisites

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


=== OpenJDK Java 17
Expand All @@ -19,8 +19,8 @@ Consequently, no extra setup is required if you are using OpenJDK Java, the corr
=== Oracle Java 17
There is some minor setup required for compatibility with Oracle Java 17 because Oracle and OpenJDK provide incompatible RPM packages for Java 17.

We provide an adapter for Oracle Java 17 which must be installed before Neo4j.
The adapter contains no code, but will stop the package manager from installing OpenJDK 17 as a dependency despite an existing Oracle Java 17 installation.
You can use an adapter for Oracle Java 17, which must be installed before Neo4j.
The adapter contains no code but stops the package manager from installing OpenJDK 17 as a dependency despite an existing Oracle Java 17 installation.

. Download and install the Oracle Java 17 JDK from the https://www.oracle.com/technetwork/java/javase/downloads/index.html[Oracle website].
. Install the adapter:
Expand All @@ -34,8 +34,8 @@ The SHA-256 of the adapter package can be verified against https://dist.neo4j.or

=== Zulu JDK 17 or Corretto 17

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

Installation instructions can be found on the manufacturer's website:

Expand Down Expand Up @@ -85,8 +85,9 @@ yum install neo4j-{neo4j-version-exact}
* Enterprise Edition
+
From Neo4j 5.4 onwards, you are required to accept either the commercial or the evaluation license agreement before running the Neo4j Enterprise Edition.
The following example uses an interactive prompt:
The following are examples of using an interactive prompt and a non-interactive installation:
+
.Interactive installation of Enterprise Edition under the commercial license
[source, shell, subs="attributes"]
----
yum install neo4j-enterprise-{neo4j-version-exact}
Expand All @@ -105,13 +106,13 @@ NEO4J_ACCEPT_LICENSE_AGREEMENT=yes yum install neo4j-enterprise-{neo4j-version-e

[NOTE]
====
Neo4j supports Security-Enhanced Linux (SELinux), by default.
Neo4j supports Security-Enhanced Linux (SELinux) by default.
====

[[linux-rpm-suse]]
== Install on SUSE

For SUSE-based distributions the steps are as follows:
For SUSE-based distributions, the steps are as follows:

. Use the following as `root` to add the repository:
+
Expand All @@ -132,15 +133,18 @@ zypper install neo4j-{neo4j-version-exact}
* Enterprise Edition
+
From Neo4j 5.4 onwards, you are required to accept either the commercial or the evaluation license agreement before running the Neo4j Enterprise Edition.
The following example uses an interactive prompt:
The following are examples of using an interactive prompt and a non-interactive installation:
+
.Interactive installation of Enterprise Edition under the commercial license
[source, shell, subs="attributes"]
----
zypper install neo4j-enterprise-{neo4j-version-exact}
----
You have to choose either a link:https://neo4j.com/terms/licensing/[commercial license] or an link:https://neo4j.com/terms/enterprise_us/[evaluation license] before the interactive installation is allowed to complete.
+
For a non-interactive installation, you can set the `NEO4J_ACCEPT_LICENSE_AGREEMENT` to `yes` (for the commercial license) or `eval` (for the evaluation license) as in the following example:
+
.Non-interactive installation of Enterprise Edition under the commercial license
[source, shell, subs="attributes"]
----
NEO4J_ACCEPT_LICENSE_AGREEMENT=yes zypper install neo4j-enterprise-{neo4j-version-exact}
Expand All @@ -149,33 +153,34 @@ NEO4J_ACCEPT_LICENSE_AGREEMENT=yes zypper install neo4j-enterprise-{neo4j-versio
[[linux-rpm-install-offline-installation]]
== Offline installation

If you cannot reach `\https://yum.neo4j.com/stable/{neo4j-version}` to install Neo4j using RPM, perhaps due to a firewall, you will need to obtain Neo4j via an alternative machine that has the relevant access, and then move the RPM package manually.
If you cannot reach `\https://yum.neo4j.com/stable/{neo4j-version}` to install Neo4j using RPM, perhaps due to a firewall, you need to obtain Neo4j via an alternative machine that has the relevant access, and then move the RPM package manually.

[NOTE]
====
It is important to note that using this method will mean that the offline machine will not receive the dependencies that are normally downloaded and installed automatically when using `yum` for installing Neo4j; xref:tools/cypher-shell.adoc[Neo4j Cypher Shell] and Java.
For information on supported versions of Java, see xref:installation/requirements.adoc[System requirements].
It is important to note that using this method means that the offline machine cannot receive the dependencies that are normally downloaded and installed automatically when using `yum` for installing Neo4j, xref:tools/cypher-shell.adoc[Neo4j Cypher Shell], and Java.
====


[[linux-rpm-install-offline-install-download]]
=== Install Neo4j using the RPM installer

. Run the following to obtain the required Neo4j RPM package:
. Download the Neo4j and Cypher Shell RPM installers from https://neo4j.com/deployment-center/[Deployment Center] or run the following to obtain the required packages:
+
* Neo4j Enterprise Edition:
* Cypher Shell:
+
[source, curl, subs="attributes"]
----
curl -O https://dist.neo4j.org/rpm/neo4j-enterprise-{neo4j-version-exact}-1.noarch.rpm
curl -O https://dist.neo4j.org/cypher-shell/cypher-shell-{neo4j-version-exact}-1.noarch.rpm
----
* Neo4j Community Edition:
+
[source, curl, subs="attributes"]
----
curl -O https://dist.neo4j.org/rpm/neo4j-{neo4j-version-exact}-1.noarch.rpm
----
* Neo4j Enterprise Edition:
+
[source, curl, subs="attributes"]
----
curl -O https://dist.neo4j.org/rpm/neo4j-enterprise-{neo4j-version-exact}-1.noarch.rpm
----

. Manually move the downloaded RPM packages to the offline machine.
Before installing Neo4j, you must manually install the required Java 17 packages.
+
Expand All @@ -184,13 +189,20 @@ Before installing Neo4j, you must manually install the required Java 17 packages
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].
You will need to additionally download and install the Java adaptor described in that section.
====
. Install Neo4j as `root` using the following command depending on which edition you are using:
. Install Neo4j and Cypher Shell as `root` using the following command depending on which edition you are using:
+
[NOTE]
====
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.
This must be one single command, and Neo4j Cypher Shell must be the first package in the command.
For later versions, you can install them separately but still need to install Cypher Shell first.
====
+
* Community Edition
+
[source, shell, subs="attributes"]
----
rpm --install neo4j-{neo4j-version-exact}-1.noarch.rpm
rpm --install cypher-shell-{neo4j-version-exact}-1.noarch.rpm neo4j-{neo4j-version-exact}-1.noarch.rpm
----
+
* Enterprise Edition
Expand All @@ -200,46 +212,18 @@ The following example uses an interactive prompt:
+
[source, shell, subs="attributes"]
----
rpm --install neo4j-enterprise-{neo4j-version-exact}
rpm --install cypher-shell-{neo4j-version-exact}-1.noarch.rpm neo4j-enterprise-{neo4j-version-exact}-1.noarch.rpm
----
You have to choose either a link:https://neo4j.com/terms/licensing/[commercial license] or an link:https://neo4j.com/terms/enterprise_us/[evaluation license] before the interactive installation is allowed to complete.
For a non-interactive installation, you can set the `NEO4J_ACCEPT_LICENSE_AGREEMENT` to `yes` (for the commercial license) or `eval` (for the evaluation license) as in the following example:
+
[source, shell, subs="attributes"]
----
NEO4J_ACCEPT_LICENSE_AGREEMENT=yes rpm --install neo4j-enterprise-{neo4j-version-exact}-1.noarch.rpm
----


[[linux-rpm-install-offline-install-perform]]
=== Install Cypher Shell using the RPM installer

. Downloaded the Cypher Shell RPM installer from {neo4j-download-center-uri}/#cyphershell[Neo4j Download Center].
. Install Cypher Shell by running the following command as a `root` user:
+
[source, shell]
----
rpm --install <Cypher Shell RPM file name>
NEO4J_ACCEPT_LICENSE_AGREEMENT=yes rpm --install cypher-shell-{neo4j-version-exact}-1.noarch.rpm neo4j-enterprise-{neo4j-version-exact}-1.noarch.rpm
----

[[linux-rpm-install-offline-install-upgrade]]
==== Offline upgrade from 4.4.0 or later

Before you begin, you will need to have Java 17 pre-installed and set to the default Java version.
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].

Due to strict dependencies between Neo4j and Cypher Shell, both packages must be upgraded simultaneously.
Run the following on the offline machine as `root`, to install Neo4j Cypher Shell and Neo4j simultaneously:

[source, shell]
----
rpm -U <Cypher Shell RPM file name> <Neo4j RPM file name>
----

This must be one single command, and Neo4j Cypher Shell must be the first package in the command.

[[rpm-service-start-automatically]]
== Starting the service automatically on system start
== Start the Neo4j service automatically on system start

To enable Neo4j to start automatically on system boot, run the following command:

Expand Down

0 comments on commit cf7372d

Please sign in to comment.