zoukankan      html  css  js  c++  java
  • 在Django中使用Neo4j

          重要的先说在前面吧,最后的选型结构是安装了最新的neo4j版本3.0.3,使用了neo4j-rest-client客户端库。主要原因是更适用于django的neomodel库目前只支持neo4j2.2.

         来自官方的文档--Using Neo4j from Python:https://neo4j.com/developer/python/   这篇官方文档为Django开发推荐NeoModel(http://neomodel.readthedocs.io/en/latest/)。另外这个文档的末尾有多篇推荐阅读,会列在最后:

         neo4j在debian系上的安装:http://debian.neo4j.org/?_ga=1.23681983.403762323.1467875632

         安装命令可能遇到以下错误:

    1. The following packages have unmet dependencies:  
    2.  neo4j : Depends: java8-runtime but it is not installable or  
    3.                   j2re1.8 but it is not installable  
    4. E: Unable to correct problems, you have held broken packages.  


    采用以下命令解决以上问题:

    1. sudo add-apt-repository ppa:webupd8team/java  
    2. sudo apt-get update  
    3. sudo apt-get install oracle-java8-installer  

    上面是安装官方JDK,也可以安装OpenJDK:

    1. sudo add-apt-repository ppa:openjdk-r/ppa  
    2. sudo apt-get update  
    3. sudo apt-get install openjdk-8-jdk  
    4. sudo update-alternatives --config java  
    5. sudo update-alternatives --config javac  


    安装以后启动失败提示:

    1. Setting up neo4j (2.2.10) ...  
    2.  System start/stop links for /etc/init.d/neo4j-service already exist.  
    3. Starting Neo4j Server...WARNING: not changing user  
    4. process [6234]... waiting for server to be ready.. Failed to start within 120 seconds.  
    5. Neo4j Server may have failed to start, please check the logs.  
    6.                 

    StackOverflow(http://stackoverflow.com/questions/28995662/what-does-warning-not-changing-user-mean-in-neo4j)提示

    1. sudo su   

    切换成root用户做操作就Ok了。

    安装时出现问题如下:

    1. The following actions will resolve these dependencies:  
    2.   
    3.      Keep the following packages at their current version:  
    4. 1)     neo4j [Not Installed]                                
    5. 2)     oracle-java9-installer [Not Installed]               

    可以把安装指令改为

    1. apt-get -f install neo4j  

    Neo4j官方文档入口:

    http://neo4j.com/docs/

    The Neo4j Manual v2.2.10:http://neo4j.com/docs/2.2.10/
    Neo4j Cypher Refcard 2.2.10:http://neo4j.com/docs/2.2.10/cypher-refcard/
    Neo4j Bolt Driver for Python:http://neo4j.com/docs/api/python-driver/current/
    The Neo4j Java Developer Reference v3.0:http://neo4j.com/docs/Java-reference/current/
    The Neo4j REST API documentation v3.0:http://neo4j.com/docs/rest-docs/current/
    Neo4j OGM - An Object Graph Mapping Library for Neo4j:http://neo4j.com/docs/ogm-manual/current/
    The Neo4j Operations Manual v3.0:http://neo4j.com/docs/operations-manual/current/
    Neo4j Cypher Refcard 3.0.3:http://neo4j.com/docs/cypher-refcard/current/
    Neo4jBooks:https://neo4j.com/books/

    官方文档Using Neo4j from Python的推荐阅读:

    Using Neo4j from Python
    Using Neo4j from Kivy
    A script to automatically migrate relational databases to Neo4J
    Py2neo Spatial
    Holger Spill: An introduction to Python and graph databases with Neo4j
    Python NLTK/Neo4j: Analysing the transcripts of How I Met Your Mother
    Flask and Neo4j
    Using Jupyter and Neo4j with Docker
    Neo4j Jupyter Visualization Notebook

    一些中文参考资料:

    图形数据库 Neo4j 开发实战:http://www.ibm.com/developerworks/cn/java/j-lo-neo4j/index.html
    neo4j使用指南(官方文档概要):http://blog.csdn.NET/gtuu0123/article/details/6384375
    图形数据库、NOSQL和Neo4j:http://www.infoq.com/cn/articles/graph-nosql-neo4j
    图数据库实践系列:http://www.linuxidc.com/Linux/2013-08/88766.htm
    spring Data Neo4j简介:http://www.infoq.com/cn/news/2013/11/spring-data-neo4j-intro
    Neo4J High Availability 设置向导:http://www.68idc.cn/help/mobilesys/J2ME/20150730468082.html

    Neo4j集群安装实践:http://blog.fens.me/nosql-neo4j-intro/

    参考资料:https://github.com/neo4j/neo4j/issues/7031

    http://www.webupd8.org/2012/09/install-Oracle-java-8-in-ubuntu-via-ppa.html

  • 相关阅读:
    Atitit  atiMail atiDns新特性 v2  q39
    Atitit.java jar hell解决方案Djava.ext.dirs in ide envi..
    砍价大法
    DWR学习
    什么是WEB 2.0
    XHTML 1.0 Tags 参考
    web.config文件遇到的错误
    JDBC教程之PreparedStatement
    符合W3C标准的target=_blank形式
    dwr 登录实现 (入门知识)
  • 原文地址:https://www.cnblogs.com/dhcn/p/7124786.html
Copyright © 2011-2022 走看看