Database Reference
In-Depth Information
Configuring a Neo4j cluster on Linux/Unix
Let's perform the following steps to install Neo4j Enterprise Edition on Linux:
1. Download and install Oracle Java 7, available at
http://www.oracle.com/technet-
work/java/javase/install-linux-self-extracting-138783.html
or Open JDK 7, avail-
able a
t
https://jdk7.java.net/download.html
.
2. Set
JAVA_HOME
as the environment variable using the following command in
your Terminal:
export JAVA_HOME=<Path of Java install Dir>
3. Download the stable release of the Linux distribution
neo4j-enter-
prise-2.1.5-unix.tar.gz
from
http://neo4j.com/download/other-releases/
.
4. Once downloaded, extract the archive into any of the selected folders and let's refer
to the top-level extracted directory as
NEO4J_HOME
.
5. Open
<$NEO4J_HOME>\conf\neo4j-server.properties
and enable/
modify the following properties:
◦
"#org.neo4j.server.database.mode=HA"
: This property al-
lows us to keep this value as
HA
. You can run it as standalone too by
providing the value as
SINGLE
.
◦
"#org.neo4j.server.webserver.address=0.0.0.0"
: This
property allows us to enable and provide the IP of the node to enable re-
mote access.
6. Open
<$NEO4J_HOME>\conf\neo4j.properties
and enable/modify the
following properties:
◦
"#ha.server_id="
: This is the unique ID of each node that will parti-
cipate in the cluster. It should be an integer (1, 2, or 3).
◦
"#ha.cluster_server=192.168.0.1:5001"
: This is the IP ad-
dress and port for communicating cluster status information with other in-
stances.
◦
"#ha.server=192.168.0.1:6001"
: This is the IP address and port
of the node for communicating transactional data with other instances.
◦
"#ha.initial_hosts=192.168.0.1:5001,192.168.0.2:5001
":
This is a comma-separated list of the host port (
ha.cluster_server
),
where all the nodes will be listening. This would be the same for all the
nodes participating in the same cluster.