轻松上手:通过 RPM 包快速部署 NebulaGraph

作者:ShunWah

在运维管理领域,我拥有多年深厚的专业积累,兼具坚实的理论基础与广泛的实践经验。我始终站在技术前沿,致力于推动运维自动化,不懈追求运维效率的最大化。

我精通运维自动化流程,对于OceanBase、MySQL等多种数据库的部署与运维,具备从初始部署到后期维护的全链条管理能力。凭借OceanBase的OBCA和OBCP认证、OpenGauss社区认证结业证书,以及崖山DBCA、亚信AntDBCA、翰高HDCA、GBase 8a | 8c | 8s、Galaxybase GBCA、Neo4j Graph Data Science Certification、NebulaGraph NGCI & NGCP等多项权威认证,我不仅展现了自己的专业技能,也彰显了对技术的深厚热情与执着追求。

在OceanBase & 墨天轮的技术征文大赛中,我凭借卓越的技术实力和独特的见解,多次荣获一、二、三等奖。同时,在OpenGauss第五届、第六届、第七届技术征文大赛,TiDB社区第三届专栏征文大赛,金仓数据库有奖征文活动,以及首批YashanDB「产品体验官」尝鲜征文等活动中,我也屡获殊荣。此外,我还活跃于墨天轮、CSDN等技术平台,经常发布原创技术文章,并多次被首页推荐,积极与业界同仁分享我的运维经验和独到见解。

前言

NebulaGraph 是一款高性能、分布式、易扩展的图数据库,专为处理大规模图数据而设计。它提供了丰富的查询语言和高效的图计算能力,适用于社交网络分析、推荐系统、知识图谱等多种应用场景。本文将详细介绍如何使用 RPM 包在 Linux 系统上安装 NebulaGraph,并提供一些优化建议和常见问题解决方案。

RPM 和 DEB 是 Linux 系统下常见的两种安装包格式,本文介绍如何使用 RPM 或 DEB 文件在一台机器上快速安装 NebulaGraph 。

image

一、环境准备

1、操作系统要求

确保您的服务器运行的是支持 RPM 包管理系统的 Linux 发行版,当前仅支持在 Linux 系统下安装 NebulaGraph,且仅支持 CentOS 7.x、CentOS 8.x、Ubuntu 16.04、Ubuntu 18.04、Ubuntu 20.04 操作系统。推荐使用 64 位操作系统以获得最佳性能。
如果用户使用的是国产化的 Linux 操作系统,请安装企业版 NebulaGraph 。

[root@instance2 ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core) 
[root@instance2 ~]# 

2、硬件要求

CPU:至少 2 核心,建议 4 核心或以上。
内存:至少 8GB RAM,根据数据量大小适当增加。
磁盘空间:确保有足够的磁盘空间用于存储数据和日志文件。

[root@instance2 ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
      8  Intel(R) Xeon(R) Gold 5118 CPU @ 2.30GHz
[root@instance2 ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:            31G         14G        6.3G        676K         10G         16G
Swap:            0B          0B          0B
[root@instance2 ~]# df -Th
Filesystem                      Type      Size  Used Avail Use% Mounted on
/dev/mapper/centos_caip122-root ext4       42G   27G   13G  68% /
devtmpfs                        devtmpfs   16G     0   16G   0% /dev
tmpfs                           tmpfs      16G     0   16G   0% /dev/shm
tmpfs                           tmpfs      16G  676K   16G   1% /run
tmpfs                           tmpfs      16G     0   16G   0% /sys/fs/cgroup
/dev/sda2                       ext4      190M   93M   83M  53% /boot
/dev/sdc1                       xfs       100G  103M  100G   1% /redo
/dev/sdb1                       xfs       100G   41G   60G  41% /data

3、访问官方文档

首先,访问NebulaGraph的官方文档网站:使用 RPM/DEB 包安装 - NebulaGraph Database 手册

4、软件依赖

在安装 NebulaGraph 之前,请确认已安装以下软件包:

[root@instance2 ~]# yum install -y epel-release
Loaded plugins: fastestmirror
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#7 - "Failed to connect to 2600:1f16:c1:5e01:4180:6610:5482:c1c0: Network is unreachable"
base                                                                                                     | 3.6 kB  00:00:00     
epel/x86_64/metalink                                                                                     | 4.7 kB  00:00:00     
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was
14: curl#7 - "Failed to connect to 2600:1f16:c1:5e01:4180:6610:5482:c1c0: Network is unreachable"
extras                                                                                                   | 2.9 kB  00:00:00     
mysql-connectors-community                                                                               | 2.6 kB  00:00:00     
mysql-tools-community                                                                                    | 2.6 kB  00:00:00     
mysql57-community                                                                                        | 2.6 kB  00:00:00     
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=stock error was
14: curl#7 - "Failed to connect to 2600:1f16:c1:5e01:4180:6610:5482:c1c0: Network is unreachable"
updates                                                                                                  | 2.9 kB  00:00:00     
Determining fastest mirrors
 * base: mirrors.bupt.edu.cn
 * epel: repo.jing.rocks
 * extras: mirrors.bupt.edu.cn
 * updates: mirrors.bupt.edu.cn
Package epel-release-7-14.noarch already installed and latest version
Nothing to do
[root@instance2 ~]# 

[root@instance2 ~]# yum install -y wget curl tar gcc make cmake openssl-devel python3-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.bupt.edu.cn
 * epel: repo.jing.rocks
 * extras: mirrors.bupt.edu.cn
 * updates: mirrors.bupt.edu.cn
Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version
Package gcc-4.8.5-44.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-26.el7_9.x86_64 already installed and latest version
Resolving Dependencies

5、下载安装包

5.1 阿里云 OSS 下载 release 版本

URL 格式如下:

//Centos 7
https://oss-cdn.nebula-graph.com.cn/package/<release_version>/nebula-graph-<release_version>.el7.x86_64.rpm

根据所需版本选择对应的RPM包下载链接。例如,如需下载3.8.0版本的NebulaGraph,CentOS 7用户应选择nebula-graph-3.8.0.el7.x86_64.rpm。

5.2 使用 wget 命令下载RPM包

使用wget命令下载RPM包,例如:
wget https://oss-cdn.nebula-graph.com.cn/package/3.8.0/nebula-graph-3.8.0.el7.x86_64.rpm
wget https://oss-cdn.nebula-graph.com.cn/package/3.8.0/nebula-graph-3.8.0.el7.x86_64.rpm.sha256sum.txt

[root@instance2 soft]# wget https://oss-cdn.nebula-graph.com.cn/package/3.8.0/nebula-graph-3.8.0.el7.x86_64.rpm
--2025-01-07 14:07:36--  https://oss-cdn.nebula-graph.com.cn/package/3.8.0/nebula-graph-3.8.0.el7.x86_64.rpm
Resolving oss-cdn.nebula-graph.com.cn (oss-cdn.nebula-graph.com.cn)... 220.181.166.204
Connecting to oss-cdn.nebula-graph.com.cn (oss-cdn.nebula-graph.com.cn)|220.181.166.204|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 64791652 (62M) [application/x-redhat-package-manager]
Saving to: ‘nebula-graph-3.8.0.el7.x86_64.rpm’

100%[======================================================================================>] 64,791,652  7.54MB/s   in 10s    

2025-01-07 14:07:46 (6.12 MB/s) - ‘nebula-graph-3.8.0.el7.x86_64.rpm’ saved [64791652/64791652]

[root@instance2 soft]# wget https://oss-cdn.nebula-graph.com.cn/package/3.8.0/nebula-graph-3.8.0.el7.x86_64.rpm.sha256sum.txt
--2025-01-07 14:08:06--  https://oss-cdn.nebula-graph.com.cn/package/3.8.0/nebula-graph-3.8.0.el7.x86_64.rpm.sha256sum.txt
Resolving oss-cdn.nebula-graph.com.cn (oss-cdn.nebula-graph.com.cn)... 220.181.166.204
Connecting to oss-cdn.nebula-graph.com.cn (oss-cdn.nebula-graph.com.cn)|220.181.166.204|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 125 [text/plain]
Saving to: ‘nebula-graph-3.8.0.el7.x86_64.rpm.sha256sum.txt’

100%[======================================================================================>] 125         --.-K/s   in 0s      

2025-01-07 14:08:06 (923 KB/s) - ‘nebula-graph-3.8.0.el7.x86_64.rpm.sha256sum.txt’ saved [125/125]

[root@instance2 soft]# 

二、安装 NebulaGraph

1、创建指定安装目录

[root@instance2 opt]# mkdir -p app/nebula-graph
[root@instance2 opt]# cd app/nebula-graph/
[root@instance2 nebula-graph]# pwd
/opt/app/nebula-graph
[root@instance2 nebula-graph]# 

2、安装 RPM 包

使用rpm命令安装下载的RPM包。例如,安装到/opt/app/nebula-graph目录(或默认路径):

[root@instance2 soft]# ls
nebula-graph-3.8.0.el7.x86_64.rpm  nebula-graph-3.8.0.el7.x86_64.rpm.sha256sum.txt  openssh-rpms
[root@instance2 soft]# rpm -ivh --prefix=/opt/app/nebula-graph nebula-graph-3.8.0.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:nebula-graph-3.8.0-1             ################################# [100%]
[root@instance2 soft]# 

–prefix为可选项,用于指定安装路径。如不设置,系统会将 NebulaGraph 安装到默认路径/usr/local/nebula/。

例如,要在默认路径下安装3.8.0版本的 RPM 包,运行如下命令:
或者,如果不指定安装路径,则默认安装在/usr/local/nebula目录下:

sudo rpm -ivh nebula-graph-3.8.0.el7.x86_64.rpm

3、配置 NebulaGraph

安装完成后,默认情况下 NebulaGraph 的配置文件位于 /etc/nebula/ 目录下。您可以根据实际需求编辑这些配置文件来调整服务参数。例如,修改监听端口、设置集群模式等。

编辑配置文件

[root@instance2 opt]# cd app/nebula-graph/
[root@instance2 nebula-graph]# ls
bin  etc  scripts  share
[root@instance2 nebula-graph]# cd etc/
[root@instance2 etc]# ls
nebula-graphd.conf             nebula-metad.conf.default     nebula-storaged.conf.production
nebula-graphd.conf.default     nebula-metad.conf.production  nebula-storaged-listener.conf.production
nebula-graphd.conf.production  nebula-storaged.conf
nebula-metad.conf              nebula-storaged.conf.default
[root@instance2 etc]# vim nebula-graphd.conf

三、启动NebulaGraph服务

1、使用脚本管理服务

使用脚本nebula.service管理服务,包括启动、停止、重启、中止和查看。
nebula.service的默认路径是/usr/local/nebula/scripts,如果修改过安装路径,请使用实际路径。
语法参数 说明

参数 说明
-v 显示详细调试信息。
-c 指定配置文件路径,默认路径为/usr/local/nebula/etc/
start 启动服务。
stop 停止服务。
restart 重启服务。
kill 中止服务。
status 查看服务状态。
metad 管理 Meta 服务。
graphd 管理 Graph 服务。
storaged 管理 Storage 服务。
all 管理所有服务。

2、查询服务状态:

使用以下命令查询NebulaGraph服务的状态:

[root@instance2 etc]# /opt/app/nebula-graph/scripts/nebula.service status all
[INFO] nebula-metad(7458486): Exited
[INFO] nebula-graphd(7458486): Exited
[INFO] nebula-storaged(7458486): Exited
[root@instance2 etc]# 

查询状态显示目前服务并没有启动。

或者,如果安装在默认路径下:

sudo /usr/local/nebula/scripts/nebula.service status all

3、启动NebulaGraph服务:

使用以下命令启动所有NebulaGraph进程:

[root@instance2 etc]# /opt/app/nebula-graph/scripts/nebula.service start all
[INFO] Starting nebula-metad...
[INFO] Done
[INFO] Starting nebula-graphd...
[INFO] Done
[INFO] Starting nebula-storaged...
[INFO] Done
[root@instance2 etc]# 

4、停止 NebulaGraph 服务

请勿使用kill -9 命令强制终止进程,否则可能较小概率出现数据丢失。
执行如下命令停止 NebulaGraph 服务:

[root@instance2 nebula-graph]# /opt/app/nebula-graph/scripts/nebula.service stop all
[INFO] Stopping nebula-metad...
[INFO] Done
[INFO] Stopping nebula-graphd...
[INFO] Done
[INFO] Stopping nebula-storaged...
[INFO] Done
[root@instance2 nebula-graph]# 

5、查看 NebulaGraph 服务

执行如下命令查看 NebulaGraph 服务状态:

如果返回如下结果,表示 NebulaGraph 服务正常运行。

[INFO] nebula-metad(33fd35e): Running as 29020, Listening on 9559
[INFO] nebula-graphd(33fd35e): Running as 29095, Listening on 9669
[WARN] nebula-storaged after v3.0.0 will not start service until it is added to cluster.
[WARN] See Manage Storage hosts:ADD HOSTS in https://docs.nebula-graph.io/
[INFO] nebula-storaged(33fd35e): Running as 29147, Listening on 9779
Note

正常启动 NebulaGraph 后,nebula-storaged进程的端口显示红色。这是因为nebula-storaged在启动流程中会等待nebula-metad添加当前 Storage 服务,当前 Storage 服务收到 Ready 信号后才会正式启动服务。从 3.0.0 版本开始,在配置文件中添加的 Storage 节点无法直接读写,配置文件的作用仅仅是将 Storage 节点注册至 Meta 服务中。必须使用ADD HOSTS命令后,才能正常读写 Storage 节点。更多信息,参见管理 Storage 主机。

6、启动报错及解决办法

6.1 启动时报错Storage hosts:服务异常

如果返回类似如下结果,表示 NebulaGraph 服务异常,可以根据异常服务信息进一步排查,或者在 NebulaGraph 社区寻求帮助。

[root@instance2 etc]# /opt/app/nebula-graph/scripts/nebula.service status all
[INFO] nebula-metad(7458486): Running as 26056, Listening on 9559 
[INFO] nebula-graphd(7458486): Running as 26079, Listening on 9669 
[WARN] nebula-storaged after v3.0.0 will not start service until it is added to cluster.
[WARN] See Manage Storage hosts:ADD HOSTS in https://docs.nebula-graph.io/
[INFO] nebula-storaged(7458486): Running as 26101, Listening on 9779 
[root@instance2 etc]# 

6.2 参考官方文档解决
https://docs.nebula-graph.com.cn/3.8.0/4.deployment-and-installation/manage-storage-host/

查询状态 “OFFLINE” 节点失败

(root@nebula) [(none)]> SHOW HOSTS STORAGE;
+----------------+------+-----------+-----------+--------------+---------+
| Host           | Port | Status    | Role      | Git Info Sha | Version |
+----------------+------+-----------+-----------+--------------+---------+
| "127.0.0.1"    | 9779 | "OFFLINE" | "STORAGE" | ""           |         |
+----------------+------+-----------+-----------+--------------+---------+
Got 2 rows (time spent 1.722ms/2.445398ms)

Tue, 07 Jan 2025 15:16:46 CST
(root@nebula) [(none)]> 

6.3 向集群中增加 Storage 主机。
(root@nebula) [(none)]> ADD HOSTS 127.0.0.1:9779;
Execution succeeded (time spent 1.593ms/2.152096ms)

Tue, 07 Jan 2025 15:16:40 CST

(root@nebula) [(none)]> 

6.4 再次检查状态
[root@instance2 nebula-graph]# /opt/app/nebula-graph/scripts/nebula.service status all
[INFO] nebula-metad(7458486): Running as 43288, Listening on 9559 
[INFO] nebula-graphd(7458486): Running as 43320, Listening on 9669 
[INFO] nebula-storaged(7458486): Running as 43408, Listening on 9779 
[root@instance2 nebula-graph]# 

查询状态 “OFFLINE” 节点失败,已经显示正常 “ONLINE” 状态了

(root@nebula) [(none)]> SHOW HOSTS STORAGE;
+-------------+------+----------+-----------+--------------+---------+
| Host        | Port | Status   | Role      | Git Info Sha | Version |
+-------------+------+----------+-----------+--------------+---------+
| "127.0.0.1" | 9779 | "ONLINE" | "STORAGE" | "7458486"    | "3.8.0" |
+-------------+------+----------+-----------+--------------+---------+
Got 1 rows (time spent 1.198ms/1.961314ms)

Tue, 07 Jan 2025 15:21:41 CST

(root@nebula) [(none)]> 

NebulaGraph 服务由 Meta 服务、Graph 服务和 Storage 服务共同提供,这三种服务的配置文件都保存在安装目录的etc目录内,默认路径为/usr/local/nebula/etc/,用户可以检查相应的配置文件排查问题。

四、安装图形化工具 nebula-console:

NebulaGraph 支持多种类型的客户端,包括命令行客户端、可视化界面客户端和流行编程语言客户端。详情参见客户端列表。

1、下载 nebula-console

nebula-console是NebulaGraph的命令行客户端工具。可以从GitHub的发布页面下载对应版本的二进制执行包,例如:

下载后,重命名并赋予执行权限,然后连接NebulaGraph服务:

版本相同的 NebulaGraph Console 和 NebulaGraph 兼容程度最高,版本不同的 NebulaGraph Console 连接 NebulaGraph 时,可能会有兼容问题,或者无法连接并报错incompatible version between client and server。

在 Assets 区域找到机器运行所需的二进制文件,下载文件到机器上。

2、重命名 nebula-console

(可选)为方便使用,重命名文件为nebula-console。

[root@instance2 nebula-graph]# ls
bin  data  etc  logs  pids  scripts  share
[root@instance2 nebula-graph]# ls
bin  data  etc  logs  nebula-console-linux-amd64-v3.8.0  pids  scripts  share
[root@instance2 nebula-graph]# mv nebula-console-linux-amd64-v3.8.0 nebula-console
[root@instance2 nebula-graph]# ls
bin  data  etc  logs  nebula-console  pids  scripts  share
[root@instance2 nebula-graph]# 

3、授予 nebula-console 权限

在运行 NebulaGraph Console 的机器上执行如下命令,为用户授予 nebula-console 文件的执行权限。

[root@instance2 nebula-graph]# ls
bin  data  etc  logs  nebula-console  pids  scripts  share
[root@instance2 nebula-graph]# chmod +x nebula-console 
[root@instance2 nebula-graph]# ls
bin  data  etc  logs  nebula-console  pids  scripts  share
[root@instance2 nebula-graph]# 

或者执行:$ chmod 111 nebula-console
在命令行界面中,切换工作目录至 nebula-console 文件所在目录。

五、连接 NebulaGraph

本文介绍如何使用原生命令行客户端 NebulaGraph Console 连接 NebulaGraph 。

Caution首次连接到 NebulaGraph 后,必须先注册 Storage 服务,才能正常查询数据。

1、执行如下命令连接 NebulaGraph 。

[root@instance2 nebula-graph]# ls
bin  cluster.id  data  etc  logs  nebula-console  pids  scripts  share
[root@instance2 nebula-graph]# ./nebula-console --addr 127.0.0.1 --port 9669 -u root -p nebula

Welcome!

(root@nebula) [(none)]> 

参数说明如下。

参数 说明
-h/-help 显示帮助菜单。
-addr/-address 设置要连接的 Graph 服务的 IP 或主机名。默认地址为 127.0.0.1。
-P/-port 设置要连接的 Graph 服务的端口。默认端口为 9669。
-u/-user 设置 NebulaGraph 账号的用户名。未启用身份认证时,可以使用任意已存在的用户名(默认为root)。
-p/-password 设置用户名对应的密码。未启用身份认证时,密码可以填写任意字符。
-t/-timeout 设置整数类型的连接超时时间。单位为毫秒,默认值为 120。
-e/-eval 设置字符串类型的 nGQL 语句。连接成功后会执行一次该语句并返回结果,然后自动断开连接。
-f/-file 设置存储 nGQL 语句的文件的路径。连接成功后会执行该文件内的 nGQL 语句并返回结果,执行完毕后自动断开连接。
-enable_ssl 连接 NebulaGraph 时使用 SSL 加密。
-ssl_root_ca_path 指定 CA 证书的存储路径。
-ssl_cert_path 指定 CRT 证书的存储路径。
-ssl_private_key_path 指定私钥文件的存储路径。

2、验证安装

为了验证 NebulaGraph 是否成功安装并正常工作,可以尝试连接到图数据库并执行简单的查询。这里我们使用官方提供的命令行工具 nebula-console:

一旦进入控制台,您可以输入 SQL 类似的语句来进行测试:

[root@instance2 nebula-graph]# ./nebula-console --addr 127.0.0.1 --port 9669 -u root -p nebula

Welcome!

(root@nebula) [(none)]> SHOW HOSTS;
+-------------+------+----------+--------------+----------------------+------------------------+---------+
| Host        | Port | Status   | Leader count | Leader distribution  | Partition distribution | Version |
+-------------+------+----------+--------------+----------------------+------------------------+---------+
| "127.0.0.1" | 9779 | "ONLINE" | 0            | "No valid partition" | "No valid partition"   | "3.8.0" |
+-------------+------+----------+--------------+----------------------+------------------------+---------+
Got 1 rows (time spent 1.732ms/2.91408ms)

Wed, 08 Jan 2025 11:18:14 CST

(root@nebula) [(none)]> 

如果能够顺利创建空间、定义标签并插入节点,则说明安装成功。

六、安装NebulaGraph Studio:

NebulaGraph Studio是NebulaGraph的可视化工具。可以从官方CDN地址下载RPM包并安装:

1、下载 NebulaGraph Studio:

wget https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/3.8.0/nebula-graph-studio-3.8.0.x86_64.rpm
rpm -ivh --prefix=/opt/app/nebula-graph-studio nebula-graph-studio-3.8.0.x86_64.rpm

[root@instance2 soft]# wget https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/3.8.0/nebula-graph-studio-3.8.0.x86_64.rpm
--2025-01-08 10:13:04--  https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/3.8.0/nebula-graph-studio-3.8.0.x86_64.rpm
Resolving oss-cdn.nebula-graph.com.cn (oss-cdn.nebula-graph.com.cn)... 220.181.167.219
Connecting to oss-cdn.nebula-graph.com.cn (oss-cdn.nebula-graph.com.cn)|220.181.167.219|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27310960 (26M) [application/x-rpm]
Saving to: ‘nebula-graph-studio-3.8.0.x86_64.rpm’

100%[======================================================================================>] 27,310,960  15.0MB/s   in 1.7s   

2025-01-08 10:13:07 (15.0 MB/s) - ‘nebula-graph-studio-3.8.0.x86_64.rpm’ saved [27310960/27310960]

[root@instance2 soft]# 

2、安装NebulaGraph Studio:

[root@instance2 soft]# rpm -ivh --prefix=/opt/app/nebula-graph-studio nebula-graph-studio-3.8.0.x86_64.rpm
Preparing...                          ################################# [100%]
Start installing NebulaGraph Studio now...
Updating / installing...
   1:nebula-graph-studio-3.8.0-1      ################################# [100%]
NebulaGraph Studio has been installed.
Created symlink from /etc/systemd/system/multi-user.target.wants/nebula-graph-studio.service to /usr/lib/systemd/system/nebula-graph-studio.service.
NebulaGraph Studio started automatically.
[root@instance2 soft]# 

或者,如果希望安装在默认路径下:

sudo rpm -ivh nebula-graph-studio-3.8.0.x86_64.rpm

3、浏览器中访问登录

安装完成后,NebulaGraph Studio会自动启动。可以在浏览器中访问localhost:7001进行登录和使用。
启动成功后,在浏览器地址栏输入http://<node_address>:30070。 如果在浏览器窗口中能看到以下登录界面,表示已经成功部署并启动 Studio。

127.0.0.1:7001/login

4、报错及解决办法

4.1 安装报错
[root@instance2 soft]# rpm -ivh --prefix=/opt/app/nebula-graph-studio nebula-graph-studio-3.8.0.x86_64.rpm
Preparing...                          ################################# [100%]
/var/tmp/rpm-tmp.w5nIeb: line 2: type: lsof: not found
Install failed for the reason: the command lsof required
error: %pre(nebula-graph-studio-3.8.0-1.x86_64) scriptlet failed, exit status 1
error: nebula-graph-studio-3.8.0-1.x86_64: install failed
[root@instance2 soft]# 

4.2 报错缺少lsof,安装 lsof:
[root@instance2 soft]# yum install lsof

4.3 重新尝试安装 nebula-graph-studio:

可以正常安装了

性能优化建议
调优 JVM 参数:对于 Java 进程(如 Graph 服务),适当调整 JVM 的堆大小和其他相关参数可以显著提升性能。
合理规划分区与副本:根据业务特点和数据分布情况,精心设计分区策略和副本因子,以保证高可用性和读写效率。
监控与报警:部署监控系统实时跟踪 NebulaGraph 的运行状态,及时发现潜在问题并通过报警机制快速响应。
常见问题及解决方案
无法启动服务
检查日志文件 (/var/log/nebula/) 中是否有错误信息。
确认防火墙规则是否允许所需的端口通信。
连接超时
确保客户端 IP 地址已被正确添加到白名单中。
尝试减少查询复杂度或分批提交请求。
性能瓶颈
分析慢查询日志,识别并优化低效查询。
增加硬件资源(如 CPU、内存)或调整配置参数。

总结

本文详细介绍了如何使用 RPM 包在 CentOS 系统上安装 NebulaGraph,并简要介绍了其配置和使用方法。NebulaGraph 作为一款开源、分布式图数据库,具有高性能、高可用性和可扩展性等优点,适用于处理超大规模数据集和复杂数据关系。通过本文的介绍,相信读者已经掌握了在 CentOS 系统上安装和使用 NebulaGraph 的基本技能,为进一步深入学习和应用打下了坚实基础。希望这篇文章能够帮助大家更好地理解和掌握 NebulaGraph 的安装过程。随着实践经验的积累,相信您会发现更多有趣的功能和技术细节,从而进一步挖掘图数据库的巨大潜力。

3 个赞

一看封面就知道是你,今天小墨也推荐了。

1 个赞

:grinning:哈哈,感谢少安老师,感谢小墨老师推荐呀

1 个赞