From cf7372da60637f9dbf6f63baeb1914bd72d5ce70 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Thu, 11 Apr 2024 16:26:32 +0300 Subject: [PATCH] Update the steps for installing Neo4j via a package installer (#1546) (#1548) Cherry-picked from #1546 --- .../ROOT/pages/installation/linux/rpm.adoc | 90 ++++++++----------- 1 file changed, 37 insertions(+), 53 deletions(-) diff --git a/modules/ROOT/pages/installation/linux/rpm.adoc b/modules/ROOT/pages/installation/linux/rpm.adoc index 1b21dc9d7..5436f058b 100644 --- a/modules/ROOT/pages/installation/linux/rpm.adoc +++ b/modules/ROOT/pages/installation/linux/rpm.adoc @@ -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 @@ -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: @@ -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: @@ -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} @@ -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: + @@ -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} @@ -149,26 +153,20 @@ 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: + @@ -176,6 +174,13 @@ curl -O https://dist.neo4j.org/rpm/neo4j-enterprise-{neo4j-version-exact}-1.noar ---- 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. + @@ -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 @@ -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 +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 ----- - -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: