在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
安装命令可能遇到以下错误:
- The following packages have unmet dependencies:
- neo4j : Depends: java8-runtime but it is not installable or
- j2re1.8 but it is not installable
- E: Unable to correct problems, you have held broken packages.
采用以下命令解决以上问题:
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java8-installer
上面是安装官方JDK,也可以安装OpenJDK:
- sudo add-apt-repository ppa:openjdk-r/ppa
- sudo apt-get update
- sudo apt-get install openjdk-8-jdk
- sudo update-alternatives --config java
- sudo update-alternatives --config javac
安装以后启动失败提示:
- Setting up neo4j (2.2.10) ...
- System start/stop links for /etc/init.d/neo4j-service already exist.
- Starting Neo4j Server...WARNING: not changing user
- process [6234]... waiting for server to be ready.. Failed to start within 120 seconds.
- Neo4j Server may have failed to start, please check the logs.
StackOverflow(http://stackoverflow.com/questions/28995662/what-does-warning-not-changing-user-mean-in-neo4j)提示
- sudo su
切换成root用户做操作就Ok了。
安装时出现问题如下:
- The following actions will resolve these dependencies:
- Keep the following packages at their current version:
- 1) neo4j [Not Installed]
- 2) oracle-java9-installer [Not Installed]
可以把安装指令改为
- apt-get -f install neo4j
Neo4j官方文档入口:
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 JavaDeveloper 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
在Django中使用Neo4j的更多相关文章
- 在django中使用django_debug_toolbar进行日志记录
一.概述 django_debug_toolbar 是django的第三方工具包,给django扩展了调试功能. 包括查看执行的sql语句,db查询次数,request,headers,调试概览等. ...
- 在django中使用django_debug_toolbar
一.概述 django_debug_toolbar 是django的第三方工具包,给django扩展了调试功能. 包括查看执行的sql语句,db查询次数,request,headers,调试概览等. ...
- 异步任务队列Celery在Django中的使用
前段时间在Django Web平台开发中,碰到一些请求执行的任务时间较长(几分钟),为了加快用户的响应时间,因此决定采用异步任务的方式在后台执行这些任务.在同事的指引下接触了Celery这个异步任务队 ...
- Mysql事务探索及其在Django中的实践(二)
继上一篇<Mysql事务探索及其在Django中的实践(一)>交代完问题的背景和Mysql事务基础后,这一篇主要想介绍一下事务在Django中的使用以及实际应用给我们带来的效率提升. 首先 ...
- Mysql事务探索及其在Django中的实践(一)
前言 很早就有想开始写博客的想法,一方面是对自己近期所学知识的一些总结.沉淀,方便以后对过去的知识进行梳理.追溯,一方面也希望能通过博客来认识更多相同技术圈的朋友.所幸近期通过了博客园的申请,那么今天 ...
- Django 中url补充以及模板继承
Django中的URL补充 默认值 在url写路由关系的时候可以传递默认参数,如下: url(r'^index/', views.index,{"name":"root& ...
- django中css问题
django中加载的css,js,图片其中js和图片可以加载出来,而css没有效果.原因如下: 这是因为你安装的某些IDE 或者其他更改了注册表导致的系统的注册表\HKEY_CLASSES_ROOT\ ...
- 在Django中进行注册用户的邮件确认
之前利用Flask写博客时(http://hbnnlove.sinaapp.com),我对注册模块的逻辑设计很简单,就是用户填写注册表单,然后提交,数据库会更新User表中的数据,字段主要有用户名,哈 ...
- django中tinymce添加图片上传功能
主要参考以下: https://pixabay.com/en/blog/posts/direct-image-uploads-in-tinymce-4-42/ http://blog.csdn.net ...
随机推荐
- 【一天一道LeetCode】#84. Largest Rectangle in Histogram
一天一道LeetCode 本系列文章已全部上传至我的github,地址:ZeeCoder's Github 欢迎大家关注我的新浪微博,我的新浪微博 欢迎转载,转载请注明出处 (一)题目 Given n ...
- Mybatis逻辑分页原理解析RowBounds
Mybatis提供了一个简单的逻辑分页使用类RowBounds(物理分页当然就是我们在sql语句中指定limit和offset值),在DefaultSqlSession提供的某些查询接口中我们可以看到 ...
- 03_Android项目中读写文本文件的代码
编写一下Android界面的项目 使用默认的Android清单文件 <?xml version="1.0" encoding="utf-8"?> & ...
- 菜鸟玩云计算之十四:克隆虚拟机及ssh登录的问题
菜鸟玩云计算之十四:克隆虚拟机及ssh登录的问题 今天早上,我的Ubuntu12.04.3LTS Desktop提示升级,升级. 从vm-ubuntu12.04克隆出虚拟机vm-thrift: $ s ...
- Unity UGUI实现图文混排
目前在unity实现图文混排的好像都是通过自定义字体然后在文本获取字符的位置,用图片替换掉图片标签,这样对于支持英文来说,并没有什么影响.然后对于中文来说就是一个相当麻烦的事了,毕竟图文混排多用于游戏 ...
- 关于C++程序的编码问题
转自: http://blog.chinaunix.net/uid-26790551-id-3190813.html 我们传统的程序基本都只在Windows或只在Linux下运行,Windows程序使 ...
- sublime text (ST)一篇通(安装、配置、扩展、使用)
sublime编辑器,功能插件多,可以扩展为IDE------------------------------------------- 1.安装 官网下载 http://www.sublimete ...
- 【嵌入式开发】C语言 结构体相关 的 函数 指针 数组
. 作者 : 万境绝尘 转载请注明出处 : http://www.hanshuliang.com/?post=30 . 结构体概述 : 结构体是 多个 变量的集合, 变量的类型可以不同; -- 可进行 ...
- 用U盘安装Ubuntu15.04
用UltraISO刻录Ubuntu15.04到U盘安装,出现:Failed to load idlinux.c32错误,解决办法如下: source url: http://www.ubuntukyl ...
- Vim/Vi实用技巧(第二版)
Vim/Vi实用技巧 1.导入文件 :r [文件名] #导入到当前编辑的文件中 如 :r /etc/inittab 文件上部为/etc/services文件,下部为/etc/inittab文件 2.执 ...