Skip to content

Instantly share code, notes, and snippets.

@widged
Last active July 11, 2020 11:57
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save widged/8329039 to your computer and use it in GitHub Desktop.
Save widged/8329039 to your computer and use it in GitHub Desktop.
Neo4j on the raspberry pi. Installation steps

My pi runs a raspbian distro (2013-09-25-wheezy-raspbian.zip)

Java

What the raspberry page officially recommends is the jdk. (Source: http://www.raspberrypi.org/archives/4920).

sudo apt-get update && sudo apt-get install oracle-java7-jdk

However, this doesn't include a server on the pi. The jre needs to be installed instead.

sudo apt-get install openjdk-7-jre

Neo4j

I simply followed the instructions there: Source: https://github.com/cjdaly/napkin/wiki/Server-on-BeagleBone-black. These instructions are reproduced below.

cd ~
mkdir neo4j
cd neo4j
wget -O neo4j-community-2.0.0.tgz 'http://download.neo4j.org/artifact?edition=community&version=2.0.0&distribution=tarball'
tar xvf neo4j-community-2.0.0.tgz
cd neo4j-community-2.0.0/conf

Edit the neo4j-wrapper.conf file, uncomment and set values for the properties below:

wrapper.java.initmemory=96
wrapper.java.maxmemory=96

Also, add this line to the neo4j-wrapper.conf file:

wrapper.java.additional=-XX:MaxPermSize=32M

Now edit the neo4j.properties file and uncomment and set these values to constrain usage of memory mapped IO:

neostore.nodestore.db.mapped_memory=1M
neostore.relationshipstore.db.mapped_memory=1M
neostore.propertystore.db.mapped_memory=1M
neostore.propertystore.db.strings.mapped_memory=1M
neostore.propertystore.db.arrays.mapped_memory=1M

export NEO4J_HOME=~/neo4j/neo4j-community-2.0.0
export PATH=$NEO4J_HOME/bin:$PATH
neo4j status

Having followed these instructions, when I tried

neo4j start 

I got

> "line 147: lsof: command not found"

Which, as per http://quickpi.wordpress.com/tag/lsof/, can be installed with:

sudo apt-get install lsof

And ...

neo4j start 
> [...] http://localhost:7474/ is ready.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment