## Installing Neo4j on Ubuntu 16.04

Some instructions for installing Neo4j on Ubuntu 16.04. More for my own benefit than anything else.

## Installing Java

Neo4j is implemented in Java, so you’ll need to have the Java Runtime Environment (JRE) installed. If you already have this up and running, go ahead and skip this step.

Check whether you can now run the java executable.

If that works for you, great! It didn’t immediately work on one of my machines. Strangely there were some dangling links in the alternatives system (which, to be honest, I was not even aware of until then!). It took a bit of Googling to figure this out, but the issue was resolved with the following:

## Installing Neo4j

First we’ll add the repository key to our keychain.

Then add the repository to the list of apt sources.

Finally update the repository information and install Neo4j.

The server should have started automatically and should also be restarted at boot. If necessary the server can be stopped with

and restarted with

## Accessing Neo4j

You should now be able to access the database server via http://localhost:7474/browser/.

I had some problems logging in with the default username and password (neo4j and neo4j), but this was easily resolved by deleting the file /var/lib/neo4j/data/dbms/auth and restarting the server.