Common configurations of Neo4j
Neo4j is very flexible in terms of configuration, and it can be changed to achieve performance, security, and flexibility.
In this recipe, you will learn about the common configuration files of Neo4j.
Getting ready
To get started with this recipe, install Neo4j using the steps from the earlier recipes of this chapter.
Before getting into the recipe, here are some important points that you need to consider:
- The main configuration file can be found at
conf/neo4j-server.properties
- The default server logging configuration file is at
conf/log4j.properties
- Tuning parameters can be tuned in the
conf/neo4j.properties
file - The configuration file for a wrapper used in daemonizing can be found at
conf/neo4j-wrapper.properties
- The logging configuration for the HTTP protocol is found in the
conf/neo4j-http-logging.xml
file
How to do it...
The Neo4j shell can also be used to access a remote graph database. To do so, perform the following steps:
- Change the following settings:
In the server primary configuration file, add this line:
enable_remote_shell = true
The default port for remote shell access can be changed by adding the following line:
enable_remote_shell_port=1234
Now, you can access the remote database.
- The Neo4j web console, by default, can be accessed only from the localhost. If you want to access the web console from any machine (which you should never do as anyone can then play with your graph database), then perform the following tasks:
- In the server primary configuration file, uncomment this line:
org.neo4j.server.webserver.address=0.0.0.0
The default port for remote shell access can be changed by editing the following line:
org.neo4j.server.webserver.port=7473
- Now, restart the Neo4j server using the following command:
./neo4j restart
- In the server primary configuration file, uncomment this line:
How it works...
Neo4j comes with lots of configuration options, and by changing the parameters in different configuration files, you can configure each part of it.
There's more…
To find out more about the configuration options, check out http://neo4j.com/docs/stable/server-configuration.html.