RHEL: 4. Start Graphlytic
If you installed Neo4j and Graphlytic as a service both applications will be started automatically after operating system is started.
If there is need you can start Neo4j or Graphlytic manually. Graphlytic depends on Neo4j so if you start applications manually there is need to start Neo4j first.
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.
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/application
.properties
Edit file and enter Neo4j password in this line:
neo4j.server.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 succesfully:
$
less
/var/log/graphlytic/graphlytic
.log
If Graphlytic was started successfully log file contains line similar to this one:
INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext
Follow instructions in First login to find out how to log into system.