Red Hat, CentOS, Fedora, and Amazon Linux (.rpm)
You can deploy Neo4j on Red Hat, CentOS, Fedora, or Amazon Linux distributions using the Neo4j RPM package.
Java prerequisites
Neo4j 5 requires the Java 17 runtime.
OpenJDK Java 17
Most of our supported Linux distributions have OpenJDK Java 17 available by default. 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.
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.
-
Download and install the Oracle Java 17 JDK from the Oracle website.
-
Install the adapter:
sudo yum install https://dist.neo4j.org/neo4j-java17-adapter.noarch.rpm
The SHA-256 of the adapter package can be verified against https://dist.neo4j.org/neo4j-java17-adapter.noarch.rpm.sha256.
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.
Installation instructions can be found on the manufacturer’s website:
Install on Red Hat, CentOS or Amazon Linux
Set up the repository
To use the repository for generally available versions of Neo4j, run 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/5
enabled=1
gpgcheck=1
EOF
Install Neo4j
Install Neo4j as root
using the following commands depending on which edition you are using:
-
Community Edition
yum install neo4j-5.12.0
-
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:
yum install neo4j-enterprise-5.12.0
You have to choose either a commercial license or an evaluation license before the interactive installation is allowed to complete. For a non-interactive installation, you can set the
NEO4J_ACCEPT_LICENSE_AGREEMENT
toyes
(for the commercial license) oreval
(for the evaluation license) as in the following example:NEO4J_ACCEPT_LICENSE_AGREEMENT=yes yum install neo4j-enterprise-5.12.0
Neo4j supports Security-Enhanced Linux (SELinux), by default. |
Install on SUSE
For SUSE-based distributions the steps are as follows:
-
Use the following as
root
to add the repository:zypper addrepo --refresh https://yum.neo4j.com/stable/5 neo4j-repository
-
Install Neo4j as
root
using the following commands depending on which edition you are using:-
Community Edition
zypper install neo4j-5.12.0
-
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:
zypper install neo4j-enterprise-5.12.0
You have to choose either a commercial license or an evaluation license before the interactive installation is allowed to complete. For a non-interactive installation, you can set the
NEO4J_ACCEPT_LICENSE_AGREEMENT
toyes
(for the commercial license) oreval
(for the evaluation license) as in the following example:NEO4J_ACCEPT_LICENSE_AGREEMENT=yes zypper install neo4j-enterprise-5.12.0
-
Offline installation
If you cannot reach https://yum.neo4j.com/stable/5
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.
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 For information on supported versions of Java, see System requirements. |
Install Neo4j using the RPM installer
-
Run the following to obtain the required Neo4j RPM package:
-
Neo4j Enterprise Edition:
curl -O https://dist.neo4j.org/rpm/neo4j-enterprise-5.12.0-1.noarch.rpm
-
Neo4j Community Edition:
curl -O https://dist.neo4j.org/rpm/neo4j-5.12.0-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.
If using Oracle Java 17, the same dependency issues apply as with the 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:-
Community Edition
rpm --install neo4j-5.12.0-1.noarch.rpm
-
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:
rpm --install neo4j-enterprise-5.12.0
You have to choose either a commercial license or an evaluation license before the interactive installation is allowed to complete. For a non-interactive installation, you can set the
NEO4J_ACCEPT_LICENSE_AGREEMENT
toyes
(for the commercial license) oreval
(for the evaluation license) as in the following example:NEO4J_ACCEPT_LICENSE_AGREEMENT=yes rpm --install neo4j-enterprise-5.12.0-1.noarch.rpm
-
Install Cypher Shell using the RPM installer
-
Downloaded the Cypher Shell RPM installer from Neo4j Download Center.
-
Install Cypher Shell by running the following command as a
root
user:rpm --install <Cypher Shell RPM file name>
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 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:
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.
Starting the service automatically on system start
To enable Neo4j to start automatically on system boot, run the following command:
systemctl enable neo4j
Before starting up the database for the first time, it is recommended to use the If the password is not set explicitly using this method, it will be set to the default password For more information, see Set an initial password. |
For more information on operating the Neo4j system service, see Neo4j system service.
Was this page helpful?