上次用neo4j的时候都是好好的,没有什么问题;今天突然要用到neo4j,发现怎么都启动不了,都是bash: neo4j: command not found
[user_neo4j@nosql01 bin]$ neo4j console
bash: neo4j: command not found
[user_neo4j@nosql01 bin]$ neo4j start
bash: neo4j: command not found
[user_neo4j@nosql01 bin]$ neo4j status
bash: neo4j: command not found
后来想起来安装的过程中,把jdk和neo4j添加到user_neo4j用户的环境变量(.bash_profile文件)之后,都会执行“source ~/.bash_profile”命令,使配置文件生效。
然后我就试了一下这个命令,没错!!!输入了这个命令后,在输入启动命令,neo4j就可以启动了。
[user_neo4j@nosql01 neo4j_demo]$ source ~/.bash_profile
[user_neo4j@nosql01 neo4j_demo]$ neo4j start
Directories in use:
home: /opt/servers/neo4j_demo/neo4j
config: /opt/servers/neo4j_demo/neo4j/conf
logs: /opt/servers/neo4j_demo/neo4j/logs
plugins: /opt/servers/neo4j_demo/neo4j/plugins
import: /opt/servers/neo4j_demo/neo4j/import
data: /opt/servers/neo4j_demo/neo4j/data
certificates: /opt/servers/neo4j_demo/neo4j/certificates
run: /opt/servers/neo4j_demo/neo4j/run
Starting Neo4j.
WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
Started neo4j (pid 1516). It is available at http://localhost:7474/
There may be a short delay until the server is ready.
See /opt/servers/neo4j_demo/neo4j/logs/neo4j.log for current status.
[user_neo4j@nosql01 neo4j_demo]$ neo4j status
Neo4j is running at pid 1516
(当时上课的时候,我是安装好之后就直接把实验内容做完了才关闭neo4j的;我朋友启动成功之后又关闭,在启动就出现了这个问题,我还以为是她安装过程有问题;向老师请教出现这个问题是什么原因,老师也不知道,最后让她重新安装一遍)。
我安装用的是jdk-11.0.6_linux-x64_bin.tar和neo4j-community-4.0.3-unix.tar,安装包连接放在这了https://pan.baidu.com/s/13E77VNYtdUIRE1CfFkbhkg
提取码:4532