Appendix B. Setting up Neo4j

 

In this appendix, we’ll cover installing and setting up the Neo4j community edition database used in Chapter 7. Instructions for both Linux and Windows installations are included.

B.1. Linux installation

To install Neo4j community edition on Linux, use your command line as instructed here: http://debian.neo4j.org/?_ga=1.84149595.332593114.1442594242.

Neo Technology provides this Debian repository to make it easy to install Neo4j. It includes three repositories:

  • Stable —All Neo4j releases, except as noted below. You should choose this by default.
  • Testing —Pre-release versions (milestones and release candidates).
  • Oldstable —No longer actively used, this repository contains patch releases for old minor versions. If you can’t find what you need in Stable, then look here.

To use the new Stable packages, you need to run the commands below as root (note that we use sudo below):

sudo -s
wget -O - https://debian.neo4j.org/neotechnology.gpg.key| apt-key add - #
     Import our signing key
echo 'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/
     neo4j.list # Create an Apt sources.list file
aptitude update -y # Find out about the files in our repository
aptitude install neo4j -y # Install Neo4j, community edition

You could replace Stable with Testing if you want a newer (but unsupported) build of Neo4j. If you’d like a different edition, you can run:

apt-get install neo4j-advanced

or

apt-get install neo4j-enterprise

B.2. Windows installation