Nebula database installation

1. What is nebula

NebulaGraph is an open source, distributed, and easily scalable native graph database that can host extremely large data sets containing hundreds of billions of points and trillions of edges, and provides millisecond-level queries.
Insert image description here

2. Use docker-compose to install the Nebula database

1. Prerequisites

  • Docker is installed on the host
  • Docker Compose is installed on the host computer.
    Download the executable file of Docker Compose. The latest version can be downloaded with the following command:
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

Give executable permission

chmod +x /usr/local/bin/docker-compose
#查看版本号
docker-compose version

2. Use Git to copy the nebula-docker-compose library to the local

$ git clone -b release-3.6 https://github.com/vesoft-inc/nebula-docker-compose.git

After downloading, copy the nebula-docker-compose folder to the /data directory of the host.
Insert image description here
Insert image description here
In fact, this yaml is executed during installation.

3. Enter the nebula-docker-compose directory on the host where nebula is installed.

cd /data/nebula-docker-compose

4. Execute the following command to start the NebulaGraph service.

docker-compose up -d

Insert image description here

5. View service status

docker-compose ps

There is no problem if they are all in the running state

6. Connect NebulaGraph

Log in to the container where NebulaGraph Console is installed, and then connect to the Graph service. This method is introduced here to verify whether you can log in

  • Use the docker-compose ps command to view the NebulaGraph Console container name.
$ docker-compose ps
          Name                         Command             State                 Ports
----------------------------------------------------------------------------------------------
nebula-dockercompose-console-1     sh -c sleep 3 &&          Up
                                  nebula-co ...
......
  • Enter the NebulaGraph Console container.
$ docker exec -it nebula-dockercompose-console-1 /bin/sh
/ #
  • Connect to NebulaGraph through NebulaGraph Console.
/ # ./usr/local/bin/nebula-console -u root -p nebula --address=graphd --port=9669

By default, the authentication function is turned off, and you can only log in using an existing username (default is root) and any password.

  • Check the status of the cluster.
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" |
+-------------+------+----------+--------------+----------------------+------------------------+---------+

Execute exit twice to exit the container.

2. Use docker-compose to install and manage the client Nebula Graph Studio

1. Download nebula-graph-studio-3.7.0.tar.gz

https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/3.7.0/nebula-graph-studio-3.7.0.tar.gz

2. Upload to the host and decompress

mkdir nebula-graph-studio-3.7.0 && tar -zxvf nebula-graph-studio-3.7.0.tar.gz -C nebula-graph-studio-3.7.0

3. After decompression, enter the nebula-graph-studio-3.7.0 directory.

cd nebula-graph-studio-3.7.0

4. Pull the Docker image of Studio.

docker-compose pull

5. Build and start the Studio service. Among them, -d means running the service container in the background.

docker-compose up -d

6. Check the running status of the container

docker-compose ps

If it is running state, it means normal

7. Connection test

Enter http://:7001 in the browser address bar.
If you can see the following login interface in the browser window, it means that the Studio has been successfully deployed and started, and you can log in
by entering the ip:9669
username and password.
Insert image description here

Guess you like

Origin blog.csdn.net/javascript_good/article/details/132720222