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 http://neo4j.com/download/.
Select the appropriate tar.gz distribution for your platform.
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 are interested in running Neo4j as a system service, please install one of our Debian or RPM packages instead.
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
The usual default of 1024 is often 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 40 000 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.
What follows is the procedure to set the open file descriptor limit to 40 000 for user neo4j under Ubuntu 10.04 and later.
If you opted to run the Neo4j service as a different user, change the first field in step 2 accordingly.
Become root, since all operations that follow require editing protected system files.
user@localhost:~$ sudo su - Password: root@localhost:~$
/etc/security/limits.conf and add these two lines:
neo4j soft nofile 40000 neo4j hard nofile 40000
/etc/pam.d/su and uncomment or add the following line:
session required pam_limits.so
A restart is required for the settings to take effect.
After the above procedure, the Neo4j user will have a limit of 40 000 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.