This section describes how to install Neo4j on Linux from a tarball, and run it as a console application or service.
Download the latest release from Neo4j Download Center.
Select the appropriate tar.gz distribution for your platform.
Check that the SHA hash of the downloaded file is correct:
SHA-256which will be located below your downloaded file.
SHA-256hash for the file that you downloaded.
Extract the contents of the archive, using
tar -xf <filename>
Refer to the top-level extracted directory as: NEO4J_HOME
Change directory to:
Ctrl-Cin the console.
If you want to run Neo4j as a system service, you can install either the Debian or RPM package.
For more information on configuring and operating the Neo4j system service, see Section 2.3.4, “Neo4j system service”.
Linux platforms impose an upper limit on the number of concurrent files a user may have open.
This number is reported for the current user and session with the
ulimit -n command:
user@localhost:~$ ulimit -n 1024
It is possible that the default value of 1024 may not be not enough. This is especially true when many indexes are used or a server installation sees too many connections. Network sockets count against the limit as well. Users are therefore encouraged to increase the limit to a healthy value of 40000 or more, depending on usage patterns.
It is possible to set the limit with the
ulimit command, but only for the root user, and it only affects the current session.
To set the value system wide, follow the instructions for your platform.
The following steps will set the open file descriptor limit to 60000 for user neo4j under Ubuntu 16.04 LTS, Debian 8, Centos 7 or later versions of those operating systems:
If you run Neo4j as a service, you must complete the following:
Run the following command, which will enable you to edit the neo4j.service file:
user@localhost:~$ sudo systemctl edit neo4j.service
[Service] section in the neo4j.service file:
If you run Neo4j as an interactive user (which can be the case for testing purposes), you must complete the following:
Run the following command, which will enable you to edit the user.conf file:
user@localhost:~$ sudo vi /etc/systemd/user.conf
Uncomment and define the value for
DefaultLimitNOFILE, found in the
[Manager] ... DefaultLimitNOFILE=60000
Run the following command which will append the /etc/security/limits.conf file:
user@localhost:~$ sudo vi /etc/security/limits.conf neo4j soft nofile 60000 neo4j hard nofile 60000
systemd settings with the command:
user@localhost:~$ sudo systemctl daemon-reload
After completing the above procedure, the Neo4j user will have a limit of 60000 simultaneous open files.
If you continue experiencing exceptions on
Too many open files or
Could not stat() directory, you may have to raise the limit further.