Single node installation of Neo4j over Linux
Neo4j is a highly scalable graph database that runs over all the common platforms; it can be used as is or can be embedded inside applications as well. The following recipe will show you how to set up a single instance of Neo4j over the Linux operating system.
Getting ready
Perform the following steps to get started with this recipe:
- Download the community edition of Neo4j from http://www.neo4j.org/download for the Linux platform:
$ wget http://dist.neo4j.org/neo4j-community-2.2.0-M02-unix.tar.gz
- Check whether Java is installed for your operating system or not by typing this in the shell prompt:
$ echo $JAVA_HOME
If this command produces no output, install JDK/JRE for your Linux distribution and also set the
JAVA_HOME
path
How to do it...
Now, let's install Neo4j over the Linux operating system, which is simple, as shown in the following steps:
- Extract the TAR file by 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
Neo4j can also be monitored using the web console. Open
http://<ip>:7474/webadmin
, as shown in the following screenshot:The preceding diagram is a screenshot of the web console of Neo4j, through which the server can be monitored and different Cypher queries can be run on the graph database.
How it works...
Neo4j comes with prebuilt binaries over the Linux 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.
See also
During installation, you may face several kind of issues, such as the maximum number of files you can keep open at once and so on. For more information, check out http://neo4j.com/docs/stable/server-installation.html#linux-install.