I installed Neo4j on Ubuntu 12.04 using these instructions: http://www.neo4j.org/download/linux
wget -O - http://debian.neo4j.org/neotechnology.gpg.key | apt
In the /etc/security/limits.conf file you need to set the limits for the user as whom you will run the neo4j server so if the user you want to use is root, then use root but it is probably bad idea, the settings:
neo4j soft nofile 40000
neo4j hard nofile 40000
would work if you where to add neo4j user, I had some problems with that so i just set these to my default user which is 'bob'.
bob soft nofile 40000
bob hard nofile 40000
and then I just started the neo4j logged in as bob.
As mentioned in this issue comment and fixed by this commit, since Neo4J 3.1,
you can add a line in
/etc/default/neo4j
:NEO4J_ULIMIT_NOFILE=60000
to set the ulimit setting (60000 open files) for the service.
There is no need anymore to use /etc/security/limits.conf
on debian to set the number of open files.