zoukankan      html  css  js  c++  java
  • neo4j图形数据库实战

    本文将介绍windows和linux下neo4j使用指南

    windows:

    1.官网下载windows版本的neo4j压缩软件---neo4j-community-3.5.5-windows

    2.通过控制台启动Neo4j程序

    点击组合键:Windows+R,输入cmd,启动DOS命令行窗口,切换到主目录,以管理员身份运行命令:

    neo4j.bat console

    3.把Neo4j安装为服务(Windows Services)

    安装和卸载服务:

    bin eo4j install-service
    bin eo4j uninstall-service

    启动服务,停止服务,重启服务和查询服务的状态:

    bin eo4j start
    bin eo4j stop
    bin eo4j restart
    bin eo4j status

    4.neo4j服务后,localhost:7474进入neo4j客户端登陆

    5.在Neo4j浏览器中创建节点和关系

    示例,编写Cypher命令,创建两个节点和两个关系:

    CREATE (n:Person { name: 'Andres', title: 'Developer' }) return n;
    CREATE (n:Person { name: 'Vic', title: 'Developer' }) return n;
    match(n:Person{name:"Vic"}),(m:Person{name:"Andres"}) create (n)-[r:Friend]->(m) return r;
    match(n:Person{name:"Vic"}),(m:Person{name:"Andres"}) create (n)<-[r:Friend]-(m) return r;

    linux:

    1.官网下载linux版本的neo4j压缩软件---neo4j-community-3.5.5-unix.tar

    2.使用Xftp将压缩软件上传至linux服务器

    3.安装教程如下

    4.操作步骤:

    ps -ef | grep neo4j 查进程得到安装目录
    ./neo4j status
    执行启动命令:./neo4j stop

    neo4j { console | start | stop | restart | status }

    如果,./neo4j stop不能停止neo4j,
    用kill -s 9 强制杀掉进程。
    然后,调用./neo4j start 启动neo4j。

    附录:java调用图形数据库

     

  • 相关阅读:
    poj 3243 Clever Y(BabyStep GiantStep)
    poj 2417 Discrete Logging
    poj 3481 Double Queue
    hdu 4046 Panda
    hdu 2896 病毒侵袭
    poj 1442 Black Box
    hdu 2815 Mod Tree
    hdu 3065 病毒侵袭持续中
    hdu 1576 A/B
    所有控件
  • 原文地址:https://www.cnblogs.com/1234cjq/p/11199619.html
Copyright © 2011-2022 走看看