问题呈现:
编译成功 但输入bin/neo4j.bat start时尽管看上去启动本地服务localhost:7474了,但事实上是进不去,出现了以下情况:
显示系统找不到指定的路径。对于这个情况其实直接输入
bin/neo4j console
能直接看出来neo4j是否已经启动,或有无报错。
用bin/neo4j status 查看状态,发现此时并没有neo4j 正在运行:
按照系统提示 输入bin/neo4j --verbose 后 显示如下:
Usage: neo4j [-hV] [--expand-commands] [--verbose] [COMMAND] A partial alias for 'neo4j-admin server'. Commands for working with DBMS process from 'neo4j-admin server' category can be invoked using this command. --expand-commands Allow command expansion in config value evaluation. -h, --help Show this help message and exit. -V, --version Print version information and exit. --verbose Prints additional information. Commands: version Print version information and exit. help Display help information about the specified command. console Start server in console. restart Restart the server daemon. start Start server as a daemon. status Get the status of the neo4j server process. stop Stop the server daemon. windows-service Neo4j windows service commands. Environment variables: NEO4J_CONF Path to directory which contains neo4j.conf. NEO4J_DEBUG Set to anything to enable debug output. NEO4J_HOME Neo4j home directory. HEAP_SIZE Set JVM maximum heap size during command execution. Takes a number and a unit, for example 512m. JAVA_OPTS Used to pass custom setting to Java Virtual Machine executing the command. Refer to JVM documentation about the exact format. This variable is incompatible with HEAP_SIZE and takes precedence over HEAP_SIZE.
显然毛用没有........
解决方法:
输入:
bin/neo4j windows-service uninstall
再次在该目录下执行
bin/neo4j start
发现已经卸载!
之后再执行命令行
bin/neo4j windows-service install
然后直接bin/neo4j console启动,可以直接看出localhost:7474服务是否已经启动
Very lucky,you made it !
补充:
Neo4j也可以作为Windows服务运行。通过使用bin\neo4j install-service
命令安装服务,并使用bin\neo4j start
命令启动服务。
以下是可用的命令:
bin\neo4j help
:显示命令帮助信息。bin\neo4j start
:启动Neo4j服务。bin\neo4j stop
:停止Neo4j服务。bin\neo4j restart
:重新启动Neo4j服务。bin\neo4j status
:获取Neo4j服务的状态。bin\neo4j install-service
:安装Neo4j服务。bin\neo4j uninstall-service
:卸载Neo4j服务。bin\neo4j update-service
:更新Neo4j服务。
在安装新版本的Neo4j之前,您必须先在先前安装的任何版本上运行bin\neo4j uninstall-service
命令。
请注意,命令中的路径bin\neo4j
是相对于Neo4j安装目录的路径。确保在命令行中使用正确的路径。