头图
This article was first published on the Nebula Graph Community public account

background

Just learning the content of graph data, there are a lot of installation documents on the Internet, which are uneven, and it is very troublesome to deploy.

A relatively complete installation document is now compiled for your reference. The MacBook used in this example uses Intel chips.

Version

  • macOS 12.0.1
  • Docker 20.10.14
  • Nebula Graph v3.X (20220415-master branch)
  • Nebula Studio v3.2.2
  • Nebula Console v3.0.0 (20220415-master branch)

Note: The above software version is the latest version of 20220415

Installation tutorial

The following contents are available for testing.

1. Docker installation

1.1 Download site

Related links: Install Docker Desktop on Mac | Docker Documentation

macOS 安装 Nebula Graph 看这篇就够了

macOS 安装 Nebula Graph 看这篇就够了

macOS 安装 Nebula Graph 看这篇就够了

1.2 Configure Docker acceleration

 "registry-mirrors": [
    "https://hub-mirror.c.163.com/",
    "https://reg-mirror.qiniu.com",
    "https://docker.mirrors.ustc.edu.cn/",
    "https://wh9z3wm8.mirror.aliyuncs.com"
  ]

macOS 安装 Nebula Graph 看这篇就够了

2. Docker network configuration

 docker network create nebula-net

macOS 安装 Nebula Graph 看这篇就够了

Note: The purpose of this is to make Nebula Graph and Nebula Studio's Docker service in the same network segment (optional)

3. Nebula Graph installation

3.1 Git clone nebula-docker-compose repository

 git clone -b master https://github.com/vesoft-inc/nebula-docker-compose.git

macOS 安装 Nebula Graph 看这篇就够了

macOS 安装 Nebula Graph 看这篇就够了

3.2 Modify docker-compose.yaml

Globally replace the network to nebula-net , add external: true

 :%s/xxx/nebula-net/g

macOS 安装 Nebula Graph 看这篇就够了

3.3 docker-compose to deploy Nebula

 docker-compose up -d

macOS 安装 Nebula Graph 看这篇就够了

4. Nebula Studio installation

4.1 Download the Nebula Studio deployment configuration file

 wget  https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/3.2.2/nebula-graph-studio-v3.2.2.tar.gz

4.2 Create the nebula-graph-studio-v3.2.2 directory and extract the installation package to the directory

 mkdir nebula-graph-studio-v3.2.2 && tar -zxvf nebula-graph-studio-v3.2.2.tar.gz -C nebula-graph-studio-v3.2.2

macOS 安装 Nebula Graph 看这篇就够了

macOS 安装 Nebula Graph 看这篇就够了

4.3 Modify docker-compose.yaml

Replace the original nebula-web with nebula-net and add external: true

 :%s/nebula-web/nebula-net/g

macOS 安装 Nebula Graph 看这篇就够了

4.4 Build and start the Nebula Studio service

 docker-compose up -d

macOS 安装 Nebula Graph 看这篇就够了

4.5 Access (recommended)

Log in to the Nebula Studio backend ( http://127.0.0.1:7001/ )

Configure Nebula database information, Host: IP address of nebula: 9669, default username and password: root/nebula.

In this example, since Nebula Graph and Nebula Studio are on the same network segment , Host:graphd:9669 can be used:

macOS 安装 Nebula Graph 看这篇就够了

to log in

5. Nebula Console installation & access

5.1 Binary file method (recommended)

Download link: https://github.com/vesoft-inc/nebula-console/releases

macOS download first

macOS 安装 Nebula Graph 看这篇就够了

After downloading the file, change the name to nebula-console. The file is a binary file. In the directory where the file is located, execute the command to enter the terminal page.

 chmod 777 nebula-console

./nebula-console -addr=127.0.0.1  -port 9669 -u root -p nebula

macOS 安装 Nebula Graph 看这篇就够了

5.2 Docker installation

 docker run --rm -ti --network nebula-net --entrypoint=/bin/sh vesoft/nebula-console:v2-nightly

macOS 安装 Nebula Graph 看这篇就够了

 nebula-console -u root -p nebula --port 9669 --address graphd

macOS 安装 Nebula Graph 看这篇就够了

5.3 Source code installation

 git clone https://github.com/vesoft-inc/nebula-console

macOS 安装 Nebula Graph 看这篇就够了

 cd nebula-console

make

go get -u golang.org/x/sys

make

./nebula-console -addr=127.0.0.1  -port 9669 -u root -p nebula

macOS 安装 Nebula Graph 看这篇就够了

Note: The source code installation requires a Golang environment, and the current GO environment version is go1.18.1.

If there is an error in the process, download it golang.org/x/sys ( go get -u golang.org/x/sys ), and just continue to make.

The generated nebula-console binary file is basically the same as the first method, you can connect directly by running the command

6. Results display

6.1 Docker service status

 docker ps

macOS 安装 Nebula Graph 看这篇就够了

macOS 安装 Nebula Graph 看这篇就够了

6.2 Nebula Studio Service Access

macOS 安装 Nebula Graph 看这篇就够了

macOS 安装 Nebula Graph 看这篇就够了

Epilogue

Original article, thank you for your support, I hope this article will give you a better experience in installing Nebula Graph.

~( ̄▽ ̄~)(~ ̄▽ ̄)~

This article is participating in the first Nebula essay contest. If you think this article is helpful to you, you can give me a ❤️ to show encouragement~ Thank you

Exchange graph database technology? To join the Nebula exchange group, please fill in your Nebula business card first, and the Nebula assistant will pull you into the group~~

Pay attention to the public account


NebulaGraph
169 声望684 粉丝

NebulaGraph:一个开源的分布式图数据库。欢迎来 GitHub 交流:[链接]