Neo4j安装

Neo4j安装

【2022年6月7日09:26:56】

按照惯例先放官方手册:Installation - Operations Manual (neo4j.com)

主要流程:

  1. 确定Neo4j版本:
    • server or desktop?社区版 or 企业版?
    • 新旧版本(建议最新版)
    • 下载与操作系统对应的安装包
  2. 安装JDK
    • JDK8 or JDK11
    • 下载安装
    • 配置环境变量
    • 测试
  3. 安装Neo4j
    • 安装
    • 配置环境变量
    • 启动,修改密码

版本简介

主要分为社区版和企业版

社区版,免费,功能有限;

根据应用形式的不同,又可分为browser版和desktop版;

桌面版是一个集成的客户端,捆绑了Java JDK 11和8版本,以及最新版本的Bloom、Browser和Neo4j Enterprise Edition。适合新手学习,安装方便,下载安装包后运行,根据提示完成安装即可。

Once Neo4j Desktop is launched, you will need to provide an activation key in order to activate your copy of Desktop. Copy and paste the key, which can be found on top of the download page, into the box in the Desktop app. Alternatively, you can generate a new key from the Desktop app by completing the form on the right hand side of the screen.

一旦 Neo4j 桌面启动,您将需要提供一个激活密钥,以激活您的桌面副本。复制并粘贴键,可以在下载页面的顶部找到,到桌面应用程序的框中。或者,你也可以通过填写屏幕右侧的表单,从 Desktop 应用程序生成一个新的密钥。

Browser版,安装配置好服务后,可通过浏览器进行可视化界面访问,适用于生产环境,进行软件的开发和部署。

Server版安装

因为自己常用windows和ubuntu,就以这两个系统为例。

版本:Neo4j-社区版-4.x

JDK安装

无论那个系统,都要首先有对应的java环境。

JDk版本匹配

neo4j-4.x和jdk11匹配.

neo4j-3.x需要jdk8.

JAVA SE JDK下载

安装好后cmd输入java -version检查是否安装好。

Windows

Windows installation - Operations Manual (neo4j.com)

  1. 下载安装

    从 Neo4j 下载中心下载最新版本。Neo4j Download Center - Neo4j Graph Data Platform

    下载好后解压到自己想放的盘里,并解压,例如:E:\Program Files (x86)\neo4j-community-4.4.7

    Neo4j应用程序有如下主要的目录结构:

    • bin目录:用于存储Neo4j的可执行程序;
    • conf目录:用于控制Neo4j启动的配置文件;
    • data目录:用于存储核心数据库文件;
    • plugins目录:用于存储Neo4j的插件;
  2. 配置系统环境变量

    • 其实安装完已经可以在<neo4j_home>\bin下用neo4j console命令启动neo4j:

      PS E:\Program Files (x86)\neo4j-community-4.4.7\bin> neo4j console
      

    但是这样只能在bin路径运行命令,不够方便,配置系统环境变量后可以在任意路径下运行neo4j命令。

    • 在计算机-属性中创建系统环境变量NEO4J_HOME,并把主目录(E:\Program Files (x86)\neo4j-community-4.4.7)设置为变量值。

      NEO4J_HOME=E:\Program Files (x86)\neo4j-community-3.4.0
      
    • 再在path中添加%NEO4J_HOME%\bin。完成配置。

3.启动

  • 打开终端,运行neo4j console
D:\>neo4j console
2020-09-04 00:57:31.092+0000 INFO  Starting...
2020-09-04 00:57:33.899+0000 INFO  ======== Neo4j 4.1.1 ========
2020-09-04 00:57:35.689+0000 INFO  Performing postInitialization step for component 'security-users' with version 2 and status CURRENT
2020-09-04 00:57:35.690+0000 INFO  Updating the initial password in component 'security-users'
2020-09-04 00:57:36.120+0000 INFO  Bolt enabled on localhost:7687.2020-09-04 00:57:37.572+0000 INFO  Remote interface available at http://localhost:7474/
2020-09-04 00:57:37.573+0000 INFO  Started.
2020-09-04 00:58:27.864+0000 WARN  The client is unauthorized due to authentication failure.
2020-09-04 00:58:28.545+0000 WARN  The client is unauthorized due to authentication failure.
  • 启动后在浏览器中键入http://localhost:7474/,进入登录界面。

  • 输入初始用户名和密码(均为neo4j),成功连接后会让我们修改密码,然后就可以开始使用了。

4.停止

在启动neo4j的终端用快捷键crtl+c可停止,或者运行neo4j stop命令。

Ubuntu

我的系统是ubuntu-18.04,用tar包的方式安装neo4j-community-4.4.7。

Linux tarball installation - Operations Manual (neo4j.com)

  1. Download the latest release from Neo4j Download Center.

从 Neo4j 下载中心下载最新版本。

Select the appropriate tar.gz distribution for your platform.

为您的平台选择适当的 tar.gz 发行版。

  1. Check that the SHA hash of the downloaded file is correct:

检查下载文件的 SHA 散列是否正确:

  1. To find the correct SHA hash, go to Neo4j Download Center and click on SHA-256 which will be located below your downloaded file.

    要找到正确的 SHA 散列,请转到 Neo4j 下载中心并单击 SHA-256,它将位于下载文件的下方。

  2. Using the appropriate commands for your platform, display the SHA-256 hash for the file that you downloaded.

    为您的平台使用适当的命令,显示您下载的文件的 SHA-256散列。

  3. Ensure that the two are identical.

    确保两者完全相同。

  4. Extract the contents of the archive, using tar -xf <filename>

使用 tar-xf < filename > 提取归档文件的内容

Refer to the top-level extracted directory as: NEO4J_HOME

请将顶级解压缩目录称为: NEO4J _ HOME

  1. Change directory to: $NEO4J_HOME

将目录更改为: $NEO4J _ HOME

Run ./bin/neo4j console

运行./bin/neo4j 控制台

  1. Stop the server by typing Ctrl-C in the console.

通过在控制台中键入 Ctrl-C 来停止服务器。

参考链接

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值