RHEL: 4. Start Graphlytic

If you installed Neo4j and Graphlytic as a service both applications will be started automatically after operating system is started.

You can also start Neo4j or Graphlytic manually. Graphlytic depends on Neo4j so if you want to start Neo4j and/or Graphlytic manually you have to start Neo4j first and Graphlytic next (after Neo4j is successfully started).

1. Start Neo4j

$ sudo service neo4j start

Neo4j was started by user "neo4j". Check status of service:

$ sudo service neo4j status

Check in log file if Neo4j was started successfully:

$ less /var/log/neo4j/console.log

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

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

1.1. 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
$ 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

$ sudo service graphlytic start

Graphlytic was started by user "graphlytic". Check status of service:

$ sudo service graphlytic status

Check in log file if Graphlytic was started successfully. There should be no error in log file:

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

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