Installing and using a neo4j server on a CentOS server

First of all, if you have weird errors while trying to install neo4j server on a machine running under CentOS, it looks like you are trying to perform installation from a folder within your $HOME directory. Which the newly created neo4j¬†user¬†(if you do a default installation) won’t be able to access. In order to avoid it, unpack the neo4j-community-x.x.x package to the /opt/ directory and

You will also need to install the Oracle Java to support the neo4j installation. A good explanation of how to do it can be found on the ubuntu stack overflow. To sum up:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

Only install oracle java as default if you don’t have other programs relying on the

If you meet the “java heap out of space error”, what you have to do is to go to the $NEO4J_HOME directorty (where you’ve installed the neo4j files), then to config and then in the neo4j-wrapper.conf file edit the following lines: = 64 = 512 (increase to 1-4 Gb if you have >4Gb of RAM)

Mastering Groovy

So, since I want to work with neo4j through bulbs, it seems that I have no other option but to use Groovy Gremlin.

Installation of groovy on Eclipse: through marketplace. Quite easy.

First attempt to use: install gremlin from Tinkerpop and access it from Groovy programming shell in eclipse. After about an hour of furious googling, it seems that a couple of libraries need to be included in the groovy shell to launch the gremlin from within groovy:

gremlin$ groovysh -cp $GREMLIN_HOME/lib/gremlin-groovy-2.3.0.jar:$GREMLIN_HOME/lib/gremlin-java-2.3.0.jar:$GREMLIN_HOME/lib/pipes-2.3.0.jar:$GREMLIN_HOME/lib/common-1.7.jar:$GREMLIN_HOME/lib/groovy-1.8.9.jar

To do the same thing from Eclipse, Project>Properties>JavaBuild Path>Add External Jars and then add:

  • $GREMLIN_HOME/lib/gremlin-groovy-2.3.0.jar
  • $GREMLIN_HOME/lib/gremlin-java-2.3.0.jar
  • $GREMLIN_HOME/lib/pipes-2.3.0.jar
  • $GREMLIN_HOME/lib/common-1.7.jar
  • $GREMLIN_HOME/lib/groovy-1.8.9.jar