NebulaGraph是一款开源的、分布式的、易扩展的原生图数据库,能够承载包含数千亿个点和数万亿条边的超大规模数据集,并且提供毫秒级查询。
curl -L "https://ghproxy.com/https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
给可执行权限
chmod +x /usr/local/bin/docker-compose
#查看版本号
docker-compose version
$ git clone -b release-3.6 https://github.com/vesoft-inc/nebula-docker-compose.git
下载下来后将nebula-docker-compose文件夹拷贝到主机的/data目录
其实安装的时候就是执行的这个yaml
cd /data/nebula-docker-compose
docker-compose up -d
docker-compose ps
都是running状态就没有问题
登录安装了 NebulaGraph Console 的容器,然后再连接 Graph 服务。这里介绍这种方式,验证是否能登录
$ docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------------------
nebula-dockercompose-console-1 sh -c sleep 3 && Up
nebula-co ...
......
$ docker exec -it nebula-dockercompose-console-1 /bin/sh
/ #
/ # ./usr/local/bin/nebula-console -u root -p nebula --address=graphd --port=9669
默认情况下,身份认证功能是关闭的,只能使用已存在的用户名(默认为root)和任意密码登录。
nebula> SHOW HOSTS;
+-------------+------+----------+--------------+----------------------+------------------------+---------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+------+----------+--------------+----------------------+------------------------+---------+
| "storaged0" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.6.0" |
| "storaged1" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.6.0" |
| "storaged2" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.6.0" |
+-------------+------+----------+--------------+----------------------+------------------------+---------+
执行两次exit可以退出容器。
https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/3.7.0/nebula-graph-studio-3.7.0.tar.gz
mkdir nebula-graph-studio-3.7.0 && tar -zxvf nebula-graph-studio-3.7.0.tar.gz -C nebula-graph-studio-3.7.0
cd nebula-graph-studio-3.7.0
docker-compose pull
docker-compose up -d
docker-compose ps
如果是running状态就表示正常
在浏览器地址栏输入 http://:7001。
如果在浏览器窗口中能看到以下登录界面,表示已经成功部署并启动 Studio
输入ip:9669
用户名和密码就可以登录了。