Ubu: 4. Start Graphlytic

Graphlytic depends on Neo4j so if you start applications manually there is need to start Neo4j first.

1. Start Neo4j

How to start Neo4j see Neo4j installation manual. It is strictly recommended to follow instructions at Neo4j manual. Here is short description how to start Neo4j but use this description with care.

1.1. Start Neo4j as a console application

Description how to start Neo4j on demand as a console application (not as a service).

Go into directory <NEO4J_HOME>/bin and execute start script.

$ sudo su neo4j
neo4j:$ cd /usr/share/neo4j/neo4j-community-3.0.0/bin
neo4j:$ nohup ./neo4j console &

Check in log file if Neo4j was started successfully:

$ less /usr/share/neo4j/neo4j-community-3.0.0/bin/nohup

If Neo4j was started successfully log file contains line similar to this one:

Remote interface ready and available at http://localhost:7474/

1.2. Change password for Neo4j at first start

There is need to change default password to neo4j for security reason. This step is required but only once. Change password if you started Neo4j for the first time.

Click here to expand how to change default Neo4j password ...

If you can access server by browser use url http://localhost:7474 and follow instructions to change password. If you don't have access use command line.

Neo4j uses HTTP Basic authentication. Name and password are sent in "Authorization" header. Value of this header should be "name:password" and this value has to be encoded by Base64.

Check status of Neo4j by sending request over HTTP. Use default name "neo4j" and passwod "neo4j" (Base64 encode is: "bmVvNGo6bmVvNGo=")

$ curl -i -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -H "Authorization: Basic bmVvNGo6bmVvNGo=" -X GET http://localhost:7474/user/neo4j

Answer should be:

HTTP/1.1 200 OK
Date: Mon, 30 Mar 2015 12:33:49 GMT
Content-Type: application/json; charset=UTF-8
Access-Control-Allow-Origin: *
Content-Length: 130
Server: Jetty(9.2.4.v20141103)
{
"username" : "neo4j",
"password_change" : "http://localhost:7474/user/neo4j/password",
"password_change_required" : true
}

Change password by sending this request (please change password "admin" to real password in this request before sending):

$ curl -i -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -H "Authorization: Basic bmVvNGo6bmVvNGo=" -d '{"password": "admin"}' -X POST http://localhost:7474/user/neo4j/password/

Expected response:

HTTP/1.1 200 OK
Date: Mon, 30 Mar 2015 12:46:50 GMT
Access-Control-Allow-Origin: *
Content-Length: 0
Server: Jetty(9.2.4.v20141103)

Configure Graphlytic to use this new password after this step

Change password for Neo4j in Graphlytic configuration file:

$ sudo su graphlytic
graphlytic:$ vi /usr/share/graphlytic/conf/graphlytic.conf

Edit file and enter Neo4j password in this line:

neo4j.connector.password=enter_real_password_for_neo4j_here

2. Start Graphlytic

Go into Graphlytic home directory

$ sudo su graphlytic
graphlytic:$ cd /usr/share/graphlytic/bin
graphlytic:$ nohup ./graphlyticc &

Check in log file if Graphlytic was started succesfully:

$ less /var/log/graphlytic/graphlytic.log

If Graphlytic was started successfully log file contains line similar to this one:

INFO s.d.g.s.u.UpgradeDBService:53 - UpgradeDB end

Follow instructions in Login with default user to find out how to log into system.