跳转至

部署 ExplorerGraph

本文介绍如何在本地通过 RPM 和 tar 包部署 Explorer。

RPM 部署Graph

前提条件Graph

在部署 Explorer 之前,用户需要确认以下信息:

  • NebulaGraph 服务已经部署并启动。详细信息参考Graph。
  • 以下端口未被使用。

    端口号 说明
    7002 Explorer 提供的 web 服务
    8070 Nebula-http-gateway 的 HTTP 服务
  • 使用的 Linux 发行版为 CentOS ,安装有版本为 v10.16.0 + 以上的 Node.js,安装有版本为1.13及以上的Go。

    Caution

    目前 Nebula Explorer 提供的包仅在 Linux 环境中使用,如果用户使用 mac 或其他环境,需要克隆Graph,并修改 nebula-http-gateway/conf/app.conf 文件中的 httpport = 8070 后使用 make 命令编译启动。

安装Graph

  1. 根据需要下载 RPM 包,建议选择最新版本。

    Enterpriseonly

    Explorer 仅在企业版提供,点击 Graph 查看更多。

  2. 使用sudo rpm -i <rpm>命令安装RPM包。

    例如,安装 Explorer 需要运行以下命令:

    $ sudo rpm -i nebula-graph-explorer-<version>.x86_64.rpm
    

卸载Graph

使用以下的命令卸载 Explorer 。

$ sudo rpm -e nebula-graph-explorer-<version>.x86_64

异常处理Graph

如果在安装过程中自动启动失败或是需要手动启动或停止服务,请使用以下命令.

  • 手动启动服务

    $ sudo sh ./scripts/start.sh
    
  • 手动停止服务

    $ sudo sh ./scripts/stop.sh
    

tar 包部署Graph

前提条件Graph

在部署 Explorer 之前,用户需要确认以下信息:

  • NebulaGraph 服务已经部署并启动。详细信息参考Graph。
  • 使用的 Linux 发行版为 CentOS ,安装有版本为 v10.16.0 + 以上的 Node.js,安装有版本为1.13及以上的Go。

    Caution

    目前 Nebula Explorer 提供的包仅在 Linux 环境中使用,如果用户使用 mac 或其他环境,需要克隆Graph,并修改 nebula-http-gateway/conf/app.conf 文件中的httpport = 8070 后使用 make 命令编译启动。

  • 以下端口未被使用。

    端口号 说明
    7002 Explorer 提供的 web 服务
    8070 Nebula-http-gateway 的 HTTP 服务

安装Graph

  1. 根据需要下载 tar 包,建议选择最新版本。

    Enterpriseonly

    Explorer 仅在企业版提供,点击 Graph 查看更多。

  2. 使用 tar -xvf 解压 tar 包。

    tar -xvf nebula-graph-explorer-<version>.tar.gz
    

部署Graph

Note

根目录 nebula-graph-explorer 下一共有两个安装包:nebula-graph-explorer 和 nebula-http-gateway。用户需要在同一台机器上分别部署并启动服务,才能完成 Explorer 的部署。

  1. 部署 nebula-http-gateway 并启动。

    $ cd nebula-http-gateway
    $ nohup ./nebula-httpd &
    
  2. 部署 nebula-graph-explorer

    $ cd nebula-graph-explorer
    $ npm run start
    

停止服务Graph

用户可以采用kill pid的方式来关停服务:

$ kill $(lsof -t -i :8070) # 停止 nebula-http-gateway
$ cd nebula-graph-explorer
$ npm run stop # 停止 nebula-graph-explorer

后续操作Graph

启动成功后,在浏览器地址栏输入 http://<ip_address>:7002

在浏览器窗口中看到以下登录界面表示已经成功部署并启动了 Explorer。

Nebula Explorer 登录页面

进入 Explorer 登录界面后,用户需要连接 NebulaGraph。详细信息,参考Graph。


最后更新: September 13, 2021
Back to top