前言
在ubuntu上使用neo4j时经常会遇到启动的问题,在这里记录下来.
参考连接:Neo4j启动失败/usr/share/neo4j/bin/neo4j: line 411: /var/run/neo4j/neo4j.pid: No such file or directory
1.ubuntu使用neo4j
首先确保系统装了Neo4j.
用以下命令启动:
sudo neo4j start
出现以下错误:
Active database: graph.db
Directories in use:
home: /var/lib/neo4j
config: /etc/neo4j
logs: /var/log/neo4j
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/run/neo4j
Starting Neo4j.
WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
/usr/share/neo4j/bin/neo4j: 行 451: /var/run/neo4j/neo4j.pid: 没有那个文件或目录
错误原因:
查看发现没有/var/run/neo4j这个目录;
解决方案:
手动创建该目录:
sudo mkdir /var/run/neo4j
再次启动:
sudo neo4j start
结果:
Active database: graph.db
Directories in use:
home: /var/lib/neo4j
config: /etc/neo4j
logs: /var/log/neo4j
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/run/neo4j
Starting Neo4j.
WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
Started neo4j (pid 25034). It is available at http://localhost:7474/
There may be a short delay until the server is ready.
See /var/log/neo4j/neo4j.log for current status.
在浏览器中输入: http://localhost:7474/,就可以登录neo4j了,登录界面如下:
写在最后
本文是个人的一些学习笔记,如有侵权,请及时联系我进行删除,谢谢大家.