Single node installation of Neo4j over Mac OS X
Neo4j is a highly scalable graph database that runs over all the common platforms; it can be used as in a mode and can also be embedded inside applications. The following recipe will show you how to set up a single instance of Neo4j over the OS X operating system.
Getting ready
Perform the following steps to get started with this recipe:
- Download the binary version of Neo4j from http://www.neo4j.org/download for the Mac OS X platform and the community edition, as shown in the following command:
$ wget http://dist.neo4j.org/neo4j-community-2.2.0-M02-unix.tar.gz
- Check whether Java is installed for the operating system or not by typing this over the
cmd
prompt:$ echo $JAVA_HOME
If this command throws no output, install JDK/JRE for your Mac OS X distribution and also set the
JAVA_HOME
path
How to do it...
Now, let's install Neo4j over the OS X operating system, which is very simple, as shown in the following steps:
- Extract the TAR file using the following command:
$ tar –zxvf neo4j-community-<version>-unix.tar.gz $ ls
- Go to the
bin
directory under the root folder:$ cd <neo4j-community-version>/bin/
- Start the Neo4j graph database server:
$ ./neo4j start
- Check whether Neo4j is running or not by using the following command:
$ ./neo4j status
How it works...
Neo4j comes with prebuilt binaries over the OS X operating system, which can be extracted and run over. Neo4j comes with both web-based and terminal-based consoles, over which the Neo4j graph database can be explored.
There's more…
Neo4j over Mac OS X can also be installed using brew
, which has been explained here.
Run the following commands over the shell:
$ brew update $ brew install neo4j
After this, Neo4j can be started by using the start option with the Neo4j command:
$ neo4j start
This will start the Neo4j server, which can be accessed from the default URL (http://localhost:7474
).
The installation can be reached by using the following commands:
$ cd /usr/local/Cellar/neo4j/ $ cd {NEO4J_VERSION}/libexec/
You can learn more about OS X installation from http://neo4j.com/docs/stable/server-installation.html#osx-install.