UbuS: 3. Install Graphlytic

1. Deploy plugin into Neo4j

Graphlytic requires some advanced features which are not delivered with Neo4j. There is plugin for Neo4j delivered with Graphlytic installation package. This plugin has to be copied into Neo4j.

Stop Neo4j if it is running. Copy file neo4j-gl-plugin.jar and into directory: <NEO4J_HOME>/plugins/.

Example:

$ sudo su neo4j
neo4j:$ cp neo4j-gl-plugin.jar /usr/share/neo4j/neo4j-community-2.3.0/plugins/

To see what is the functionlity of plugin see Architecture.

2. Install Graphlytic

2.1. Install Graphlytic as service

After this installation Graphlytic will start automaticly after operating system is started. Neo4j is required by Graphlytic so there is also need to install Neo4j as a service (see UbuS: 2. Install Neo4j)

Graphlytic application will be started by user 'graphlytic'. Create this user:

$ sudo useradd -M graphlytic
$ sudo usermod -L graphlytic

Copy Graphlytic installation file "graphlytic.tar.gz" into /tmp/.

Create directory structure:

$ sudo mkdir -p /usr/share/graphlytic /var/lib/graphlytic /var/log/graphlytic
$ sudo chown -R graphlytic:graphlytic /usr/share/graphlytic /var/lib/graphlytic /var/log/graphlytic

Copy installation file and unpack it:

$ sudo su graphlytic
graphlytic:$ cp /tmp/graphlytic.tar.gz /usr/share/graphlytic
graphlytic:$ cd /usr/share/graphlytic
graphlytic:$ tar zxvf graphlytic.tar.gz

Configure Graphlytic:

graphlytic:$ vi /usr/share/graphlytic/application.properties

Edit this configuration file to contains these lines:

# where graphlytic stores its data
main.dataDir=/var/lib/graphlytic/
# url of neo4j endpoit
neo4j.server.url=http://localhost:7474/
# username for neo4j server
neo4j.server.username=neo4j
# password for neo4j server
neo4j.server.password=enter_real_password_for_neo4j_here

Configure starting script:

graphlytic:$ chmod a+x /usr/share/graphlytic/graphlyticd
graphlytic:$ vi /usr/share/graphlytic/graphlyticd

Edit this configuration file to use HTTP or HTTPS or both:

#!/bin/sh
 
# use this script with created service
 
# disable or enable HTTP/HTTPS. To disabele comment od remove line
#HTTP_PORT=8080
HTTPS_PORT=8443

Copy init script and enable service:

$ sudo cp /usr/share/graphlytic/graphlytic-init-deb /etc/init.d/graphlytic
$ sudo chmod a+x /etc/init.d/graphlytic

Add service to automaticly start after OS started:

$ sudo update-rc.d graphlytic defaults 97 03 

Check if service was enabled:

$ sudo find /etc/rc?.d/ -name "*graphlytic*"
 
expected result:
/etc/rc0.d/K03graphlytic
/etc/rc1.d/K03graphlytic
/etc/rc2.d/S97graphlytic
/etc/rc3.d/S97graphlytic
/etc/rc4.d/S97graphlytic
/etc/rc5.d/S97graphlytic
/etc/rc6.d/K03graphlytic