2.3.2. Deploy Neo4j using the Neo4j RPM package

This section describes how to deploy Neo4j using the Neo4j RPM package on Red Hat, CentOS, Fedora, or Amazon Linux distributions.

This section describes the following:

2.3.2.1. Install on Red Hat, CentOS, Fedora or Amazon Linux

Standard installation
  1. Add the repository.

    Use the following as root to add the repository:

    rpm --import https://debian.neo4j.com/neotechnology.gpg.key
    cat <<EOF>  /etc/yum.repos.d/neo4j.repo
    [neo4j]
    name=Neo4j RPM Repository
    baseurl=https://yum.neo4j.com/stable
    enabled=1
    gpgcheck=1
    EOF

    For milestone, alpha, beta, and release candidate releases, replace the baseurl line with baseurl=https://yum.neo4j.org/testing

  2. Ensure the correct Java version.

    Neo4j 4.0 requires the Java 11 runtime. Most of our supported RPM Linux distributions have Java 11 available by default. There is some minor setup required for Amazon Linux, and for compatibility with Oracle Java 11.

    • Java 11 on Amazon Linux.

      To enable OpenJDK 11 on Amazon Linux run the shell command:

      amazon-linux-extras enable java-openjdk11

      You are now ready to install Neo4j 4.0.0, which will install Java 11 automatically if it is not already installed.

    • Oracle Java 11.

      Oracle and OpenJDK provide incompatible RPM packages for Java 11. We provide an adapter for Oracle Java 11 which must be installed before Neo4j. The adapter contains no code, but will stop the package manger from installing OpenJDK 11 as a dependency despite an existing Java 11 installation.

      This step assumes that you have performed the previous step to set up the yum repository.

      1. Download and install the Oracle java 11 JDK from the Oracle website.
      2. Install the adapter:

        sudo yum install https://dist.neo4j.org/neo4j-java11-adapter.noarch.rpm

        The SHA-256 of the adapter package can be verified against https://dist.neo4j.org/neo4j-java11-adapter.noarch.rpm.sha256.

    You are now ready to install Neo4j 4.0.0.

  3. Install Neo4j.

    • To install Neo4j Community Edition as root:

      yum install neo4j-4.0.0
    • To install Neo4j Enterprise Edition as root:

      yum install neo4j-enterprise-4.0.0

      If you are installing a milestone, alpha, beta, or release candidate release, the name of the package is neo4j-enterprise-<version>-0.<release>.1. For example, Neo4j Enterprise Edition Milestone Release 3 would be: neo4j-enterprise-4.0.0-0.beta03mr03.1

  4. Run the following to return the version and edition of Neo4j that has been installed:

    rpm -qa | grep neo
Non-interactive installation of Neo4j Enterprise Edition

When installing Neo4j Enterprise Edition, you will be required to accept the license agreement before installation is allowed to complete. This is an interactive prompt. If you require non-interactive installation of Neo4j Enterprise Edition, you can indicate that you have read and accepted the license agreement by setting the environment variable NEO4J_ACCEPT_LICENSE_AGREEMENT to yes:

NEO4J_ACCEPT_LICENSE_AGREEMENT=yes yum install neo4j-enterprise-4.0.0
Offline installation

If you cannot reach https://yum.neo4j.org/stable, perhaps due to a firewall, you will need to obtain Neo4j via an alternative machine which has the relevant access, and then move the RPM package manually.

It is important to note that using this method will mean that the offline machine will not receive the dependencies that are that are normally downloaded and installed automatically when using RPM for installing Neo4j; Cypher Shell and Java (if not installed already):

  1. Run the following to obtain the required RPM package:

    • Neo4j Enterprise Edition:

      curl -O http://yum.neo4j.org/stable/neo4j-enterprise-4.0.0-1.noarch.rpm
    • Neo4j Community Edition:

      curl -O http://yum.neo4j.org/stable/neo4j-4.0.0-1.noarch.rpm
  2. Manually move the downloaded RPM package to the offline machine.
  3. Run the following on the offline machine to install Neo4j:

    rpm -i <rpm file name>

2.3.2.2. Install on SUSE

SUSE is not certified for production use. These instructions are provided for convenience for those wishing to use Neo4j in non-production environments.

For SUSE-based distributions the steps are as follows:

  1. Use the following as root to add the repository:

    zypper addrepo --refresh https://yum.neo4j.org/stable neo4j-repository
  2. Install Neo4j.

    • To install Neo4j Community Edition as root:

      zypper install neo4j-4.0.0
    • To install Neo4j Enterprise Edition as root:

      zypper install neo4j-enterprise-4.0.0