Got “neo4j: command not found” error when installing Neo4j on Linux machine

怎甘沉沦 提交于 2019-12-24 16:01:10

问题


I tried to install Neo4j1.9.2 on an Ubuntu machine. I downloaded neo4j-community-1.9.2-unix.tar.gz from Neo4j.org and unzipped it. The neo4j file is in the bin directory.

In bin directory, I typed command "neo4j start", got error "neo4j: command not found". I also tried command "sudo neo4j install", after I provided the password, I got same error "neo4j: command not found".

Java has been installed on this machine: java version "1.6.0_27" OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)


回答1:


You probably don't have . in your PATH, so you need to do ./neo4j start.




回答2:


If you install neo4j on your system using a package manager (mine is on gentoo using the portage overlay) the command is under /etc/init.d/neo4j. I found these useful in gentoo.

rc-service neo4j start
rc-update add neo4j default

The shell is on the path for all users, but the service is not on the path. This is the case for most services in most linux distributions, unless you have a DIY install.




回答3:


You can start the neo4j server with:

service neo4j-service start

But, if you are able to access localhost:7474, then the server has already been started. You can check the status with:

service neo4j-service status



来源:https://stackoverflow.com/questions/18114890/got-neo4j-command-not-found-error-when-installing-neo4j-on-linux-machine

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!