1. nebula前置条件
$ yum update
$ yum install -y make \
m4 \
git \
wget \
unzip \
xz \
readline-devel \
ncurses-devel \
zlib-devel \
gcc \
gcc-c++ \
cmake \
gettext \
curl \
redhat-lsb-core \
bzip2
2.下载rpm
https://nebula-graph.com.cn/download/选择合适的版本下载
3. 安装rpm
sudo rpm -ivh --prefix=/usr/local/nebula nebula-graph-2.0.1.el7.x86_64.rpm
4.启动
sudo /usr/local/nebula/scripts/nebula.service start all
查看启动状态
sudo /usr/local/nebula/scripts/nebula.service status all
5. 下载Nebula Graph Studio
6. 启动studio
使用的 Linux 发行版为 CentOS ,安装有 lsof 和版本为 v10.16.0 + 以上的 Node.js。
需要安装nodejs
bash /usr/local/nebula-graph-studio/scripts/start.sh
参考https://docs.nebula-graph.com.cn/2.0.1/2.quick-start/5.start-stop-service/
7.集群搭建
https://blog.youkuaiyun.com/weixin_44674220/article/details/116659708
8.相关命令查询
sudo scripts/nebula.service -help
Usage: scripts/nebula.service [-v] [-c /path/to/config] <start|stop|restart|status|kill> <metad|graphd|storaged|all>
9.安装nebula-graph-dashboard-1.0.0-1.x86_64.tar.gz
wget https://oss-cdn.nebula-graph.com.cn/nebula-graph-dashboard/nebula-graph-dashboard-1.0.0-1.x86_64.tar.gz
tar -xvf nebula-graph-dashboard-1.0.0-1.x86_64.tar.gz
转载
0. 三台装有CentOS7.8系统的虚拟机,IP如下:
192.168.80.128 # master
192.168.80.129 # slav1
192.168.80.130 # slav2
1. 在三台机器上安装nebula graoh 2.0.0wget https://oss-cdn.nebula-graph.com.cn/package/2.0.0/nebula-graph-2.0.0.el7.x86_64.rpm
1
2. 安装 默认安装路径/usr/local/nebulasudo rpm -ivh --prefix=/usr/local/nebula nebula-graph-2.0.0.el7.x86_64.rpm
1
3. 进入配置文件目录,修改权限cd /usr/local
sudo chown -R syy:syy nebula
cd nebula/etc
1
2
3
4. 配置nebula-metad.conf
修改meta_server_addrs和local_ip两个字段,其他使用默认字段########## networking ##########
# Comma separated Meta Server addresses
--meta_server_addrs=192.168.80.128:9559,192.168.80.129:9559,192.168.80.130:9559
# Local IP used to identify the nebula-metad process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=192.168.80.128
# Meta daemon listening port
--port=9559
1
2
3
4
5
6
7
8
9
5. 修改配置文件nebula-graphd.conf
修改meta_server_addrs和local_ip两个字段,其他使用默认字段########## networking ##########
# Comma separated Meta Server addresses
--meta_server_addrs=192.168.80.128:9559,192.168.80.129:9559,192.168.80.130:9559
# Local IP used to identify the nebula-metad process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=192.168.80.128
# Meta daemon listening port
--port=9669
1
2
3
4
5
6
7
8
9
6. 修改配置文件nebula-storaged.conf
修改meta_server_addrs和local_ip两个字段,其他使用默认字段########## networking ##########
# Comma separated Meta Server addresses
--meta_server_addrs=192.168.80.128:9559,192.168.80.129:9559,192.168.80.130:9559
# Local IP used to identify the nebula-metad process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=192.168.80.128
# Meta daemon listening port
--port=9779
1
2
3
4
5
6
7
8
9
7. 修改另外两台机器的配置文件
修改local_ip位对应机器的IP地址
如果修改了配置文件,希望新配置生效,请在配置文件开头添加--local_config=true再重启服务,否则会从缓存中读取过期配置。8. 启动集群
master:/usr/local/nebula/scripts/nebula.service start all
1
slav1和slav2:/usr/local/nebula/scripts/nebula.service start metad
/usr/local/nebula/scripts/nebula.service start storaged
1
2
9. 连接graph服务
安装nebula-console
下载nebula-console-linux-amd64-v2.0.0-ga
Add execute permissions to the binarymv nebula-console-linux-amd64-v2.0.0-ga nebula-console
chmod +777 nebula-console
1
2
启动nebula-console./nebula-console -addr=192.168.80.128 -port 9669 -u root -p nebula
1处理报错
[WARN] The maximum files allowed to open might be too few: 1024
1
修改文件/etc/security/limits.conf* soft nofile 204800
* hard nofile 204800
* soft nproc 204800
* hard nproc 204800
1
2
3
4
修改文件/etc/security/limits.d/20-nproc.conf* soft nproc 204800
* hard nproc 204800
1
2
修改文件/etc/security/limits.d/def.conf* soft nofile 204800
* hard nofile 204800
1
2
重启
————————————————
版权声明:本文为优快云博主「对数好奇」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.youkuaiyun.com/weixin_44674220/article/details/116659708