hugegraph 安装笔记

2022-11-06  本文已影响0人  走在成长的道路上

安装配置

  1. 安装 hugegraph-server 服务端
tar xfv hugegraph-0.12.0.tar.gz
cd hugegraph-0.12.0
# 修改 conf/computer.yaml 文件
-  hugegraph_url: "http://127.0.0.1:8080"
+ hugegraph_url: "http://0.0.0.0:18080"

# 修改 conf/rest-server.properties 文件
-  restserver.url=http://127.0.0.1:8080
+ restserver.url=http://127.0.0.1:8080

conf/graphs 目录下配置所有系统支持的图库配置信息。

默认使用 Rocksdb 存放数据(在 conf/graphs/hugegraph.properties 文件中修改) ,然后使用 ./bin/init-store.sh 进行初始化

如果需要增加新图,则复制 hugegraph.properties 进行修改即可

此处的文件名即为 图名称 即 hubble 配置图时使用的参数

 $ ./bin/start-hugegraph.sh
Starting HugeGraphServer...
Connecting to HugeGraphServer (http://0.0.0.0:18080/graphs).....OK
Started [pid 5005]

判定服务是否启动 jps 命令查看即可,或浏览 http://127.0.0.1:18080/graphs 链接即可

  1. 安装 hugegraph-hubble 服务
tar xfv hugegraph-hubble-1.6.0.tar.gz
cd hugegraph-hubble-1.6.0
# 修改 conf/hugegraph-hubble.properties 文件
- server.host=127.0.0.1
+ server.host=0.0.0.0

- server.port=8088
+ server.port=18088
$ ./bin/start-hubble.sh
starting HugeGraphHubble....OK
logging to /srv/tools/hugegraph-hubble-1.6.0/logs/hugegraph-hubble.log

判定服务是否启动 jps 命令查看即可,或浏览 http://127.0.0.1:18088 链接即可
通过点击 创建图 按钮即可添加,这里使用 graphs 作为图ID, hugegraph 设置为图名称,即可访问
创建的图名称与 hugegraph-xxx/conf/graphs/ 中文件名称必须一致,否者会找不到图

  1. 编写启动及停止脚本
jps | grep HugeGraphServer

if [ $? -ne 0 ]
then
# 启动 HugeGraph 服务
./hugegraph-0.12.0/bin/start-hugegraph.sh
else
echo "the hugegraph service has started .. port: 18088 .."
fi

jps | grep HugeGraphHubble

if [ $? -ne 0 ]
then
# 启动 HugeGraph Hubble 服务
./hugegraph-hubble-1.6.0/bin/start-hubble.sh
else
echo "the hugegraph hubble service has started .. port: 18080 .."
fi
jps | grep HugeGraphServer

if [ $? -ne 0 ]
then
echo "the hugegraph service has stopped...."
else
# 停止 HugeGraph 服务
./hugegraph-0.12.0/bin/stop-hugegraph.sh
fi

jps | grep HugeGraphHubble

if [ $? -ne 0 ]
then
echo "the hugegraph hubble service has stopped...."
else
# 停止 HugeGraph Hubble 服务
./hugegraph-hubble-1.6.0/bin/stop-hubble.sh
fi
上一篇下一篇

猜你喜欢

热点阅读