重要的先說在前面吧,最后的選型結構是安裝了最新的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 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
