重要的先说在前面吧,最后的选型结构是安装了最新的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
proce