如何在Mac上安装/启动Neo4j?

4

我尝试两种方法在Mac/Maverics上安装Neo4j:

1) 从http://www.neo4j.org/下载zip文件,同时安装JDK8。

$ /Users/xx/Downloads/neo4j-community-2.1.2/bin/neo4j-installer install
WARNING: this installer is deprecated and may not be the optimal way to install Neo4j on your system.
  Please see the Neo4j Manual for up to date information on installing Neo4j.
Press any key to continue

2) 然后我使用Homebrew安装了它,安装成功了,但是当我尝试启动时:

$ neo4j start
Another server-process is running with [311], cannot start a new one. Exiting.
$ neo4j stop
ERROR: Neo4j Server not running
$ neo4j status
Neo4j Server is not running
$ neo4j install
Legacy install now lives in the 'neo4j-installer' script

问题是什么,如何安装/启动?

更新

PID为311的服务器是Java。所以我只需将其杀死,然后重新启动它,现在可以正常工作了。这是处理问题的正常方法吗?

$ kill 311
$ /usr/local/Cellar/neo4j/2.1.2/bin/neo4j start
Using additional JVM arguments:  -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Dneo4j.ext.udc.source=homebrew -Djava.awt.headless=true
Starting Neo4j Server...WARNING: not changing user
process [1748]... waiting for server to be ready....... OK.
http://localhost:7474/ is ready.

服务器PID 311是Java。你所说的“Java”具体指什么? - fbiville
1
我打开了监视器,向下滚动到PID 311,发现一个名为java的进程,没有其他信息。 - János
嗯,好的。所以正如我回答的那样,我猜这完全是针对你的设置而言,不是通常需要做的事情。 - fbiville
我在安装过程中没有做任何特定的事情,我有一台标准的Mac电脑,按照建议我安装了JDK 8,我不明白为什么安装过程如此复杂。 - János
1
安装其实非常简单。你只是碰巧有一个冲突的执行进程,那就是你设置中的具体部分。不幸的是,我们无法获取有关此进程的更多信息。这通常确实不会发生。 - fbiville
1
这也发生在我身上。每次出现问题,我都必须退出Java进程并重新启动服务器。我没有更改任何偏好设置,正在使用Mac。 - Adam Carter
3个回答

19

使用更加简单: brew install neo4j


2
现在也可以使用 Docker 安装它:
docker run \
       --publish=7474:7474 \
       --publish=7687:7687 \
       --name neo4j \
       --volume=$HOME/neo4j/data:/data \
       neo4j:3.3

请注意命令结尾处的3.3。您可以更改它以运行另一个版本的Neo4j。在此处查看可用版本列表:https://hub.docker.com/_/neo4j?tab=tags

0

我觉得你遇到的问题只是由于你特定的本地设置造成的。


是的,重复冲突的安装。可以选择二进制下载或Homebrew安装。 - Michael Hunger

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接