docker环境部署Nebula Graph Database


https://hub.docker.com/_/centos?tab=tags 选择你需要安装的centos版本,我选择的是 7.9.2009 版本。

% docker pull centos:centos7.9.2009
centos7.9.2009: Pulling from library/centos
2d473b07cdd5: Pull complete 
Digest: sha256:9d4bcbbb213dfd745b58be38b13b996ebb5ac315fe75711bd618426a630e0987
Status: Downloaded newer image for centos:centos7.9.2009
docker.io/library/centos:centos7.9.2009

## 查看本地镜像
% docker images
REPOSITORY   TAG              IMAGE ID       CREATED        SIZE
centos       centos7.9.2009   eeb6ee3f44bd   2 months ago   204MB
...

https://docs.nebula-graph.com.cn/2.6.1/4.deployment-and-installation/2.compile-and-install-nebula-graph/2.install-nebula-graph-by-rpm-or-deb/

https://docs.nebula-graph.com.cn/2.6.1/4.deployment-and-installation/manage-service/

请勿使用kill -9 命令强制终止进程,否则可能较小概率出现数据丢失。

https://nodejs.org/zh-cn/download/

## 安装lsof命令
yum install lsof


wget https://nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz

## 

tar --strip-components 1 -xvf ./node-v16.13.1-linux-x64.tar.xz  -C /usr/local

## 测试安装
# node -v
v16.13.1

## node 及 npm 命令需要安装在 /usr/bin/目录下,以防出现 RPM 安装时 node 命令找不到的情况。 例如 nodejs12 默认目录为/opt/rh/rh-nodejs12,用户可以使用以下命令建立软连接:
$ sudo ln -s /opt/rh/rh-nodejs12/root/usr/bin/node /usr/bin/node
$ sudo ln -s /opt/rh/rh-nodejs12/root/usr/bin/npm /usr/bin/npm

解压缩时报
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
可以看
https://blog.csdn.net/weixin_37657720/article/details/81117871
解决方案。
tar包压缩的时候用cvf参数,解压的时候用xvf参数
或压缩的时候用czvf参数,解压的时候用xzvf参数

https://docs.nebula-graph.com.cn/2.6.1/2.quick-start/3.connect-to-nebula-graph/#_3

https://www.bookstack.cn/read/Nebula-Graph-Database-2.5.1-zh/526e79620d1f79f1.md?wd=Cloud%20Studio

https://yeasy.gitbook.io/docker_practice/network/port_mapping
  • https://www.runoob.com/docker/docker-container-connection.html
  • 完成端口映射后,就可以在docker宿主机上访问docker容器的端口。

    在host文件中我们有这样的

    127.0.0.1 kubernetes.docker.internal
    

    我们最终使用就可以用 http://kubernetes.docker.internal:7001/ 来使用。

    http://kubernetes.docker.internal:7001/
    连接地址: kubernetes.docker.internal:9669
    默认用户名 root 和任意密码

    更详细的看手册:
    https://docs.nebula-graph.com.cn/2.6.1

    保存工作

    docker ps
    
    docker commit  fb44df0cbf8f  centos:ng 
    

    停止服务

    bash /usr/local/nebula-graph-studio/scripts/rpm/stop.sh
    /usr/local/nebula/scripts/nebula.service stop all
    exit