当前位置: 首页 > news >正文

install nebula with source

linux 环境:ubuntu 2004

默认gcc 7.5

nebula requerment: g++ 8.5 above

下载source

git clone --branch release-3.8 https://github.com/vesoft-inc/nebula.git
 


install gcc g++ 11

apt install gcc-11 g++-11

此时 linux环境存在多个版本gcc:7,9.11

查看 gcc --version,显示仍然是7.5.这种情况需要如下配置:

1.

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gcov gcov /usr/bin/gcov-7

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9

2.

sudo update-alternatives --config gcc

选择:0

(base) root@ubuntu:/usr/bin# sudo update-alternatives --config gcc
There are 3 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-11   110       auto mode
  1            /usr/bin/gcc-11   110       manual mode
  2            /usr/bin/gcc-7    70        manual mode
  3            /usr/bin/gcc-9    90        manual mode

Press <enter> to keep the current choice[*], or type selection number: 


install three part 

$ cd nebula/third-party $ ./install-third-party.sh

服务器下载文件失败,从本地下载:

curl https://oss-cdn.nebula-graph.com.cn/third-party/3.3/vesoft-third-party-3.3-x86_64-libc-2.31-gcc-11.2.0-abi-11.sh --output D:\vesoft-third-party-3.3-x86_64-libc-2.31-gcc-11.2.0-abi-11.sh

将文件上传到nebula/thirdpart/

bash vesoft-third-party-3.3-x86_64-libc-2.31-gcc-11.2.0-abi-11.sh

输出:

Nebula Third Party has been installed to /opt/vesoft/third-party/3.3


make

cd ..
mkdir build && cd build

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/nebula -DENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ..
 

加快mk速度:

查看CPU核数:
(base) root@ubuntu:/data/nebula3.8/nebula/build# cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
32
(base) root@ubuntu:/data/nebula3.8/nebula/build# cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores       : 1
(base) root@ubuntu:/data/nebula3.8/nebula/build# cat /proc/cpuinfo| grep "processor"| wc -l
32 

(base) root@ubuntu:/data/nebula3.8/nebula/build# free
              total        used        free      shared  buff/cache   available
Mem:       65845892     1874080    12186732        6240    51785080    63268188

 衡量内存和CPU数据,确认N为32

N = 32

参考:make -j{N} # E.g., make -j2
执行下面命令:

make -j32


创建配置文件三个:

cd /usr/local/nebula/etc

cp nebula-graphd.conf.default nebula-graphd.conf

cp nebula-metad.conf.default nebula-metad.conf

cp nebula-storaged.conf.default nebula-storaged.conf

启动服务:

sudo /usr/local/nebula/scripts/nebula.service start all 

 netstat -nplt

(base) root@ubuntu:/usr/local/nebula/etc# netstat -nplt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:19559           0.0.0.0:*               LISTEN      1909079/nebula-meta 
tcp        0      0 127.0.0.1:44041         0.0.0.0:*               LISTEN      1658097/python      
tcp        0      0 127.0.0.1:40495         0.0.0.0:*               LISTEN      1658097/python      
tcp        0      0 127.0.0.1:60975         0.0.0.0:*               LISTEN      1658097/python      
tcp        0      0 127.0.0.1:50707         0.0.0.0:*               LISTEN      1658097/python      
tcp        0      0 10.255.132.22:60020     0.0.0.0:*               LISTEN      1740/./gse_agent    
tcp        0      0 0.0.0.0:19669           0.0.0.0:*               LISTEN      1909140/nebula-grap 
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      938/systemd-resolve 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1119/sshd: /usr/sbi 
tcp        0      0 127.0.0.1:43799         0.0.0.0:*               LISTEN      1658097/python      
tcp        0      0 0.0.0.0:8701            0.0.0.0:*               LISTEN      1657354/python      
tcp        0      0 127.0.0.1:46655         0.0.0.0:*               LISTEN      1658097/python      
tcp6       0      0 :::9669                 :::*                    LISTEN      1909140/nebula-grap 
tcp6       0      0 :::9835                 :::*                    LISTEN      1037/nvidia_gpu_exp 
tcp6       0      0 :::9100                 :::*                    LISTEN      1044/node_exporter  
tcp6       0      0 :::22                   :::*                    LISTEN      1119/sshd: /usr/sbi 
tcp6       0      0 :::9559                 :::*                    LISTEN      1909079/nebula-meta 
tcp6       0      0 :::9560                 :::*                    LISTEN      1909079/nebula-meta 
tcp6       0      0 :::3000                 :::*                    LISTEN      2130337/grafana     
tcp6       0      0 :::8701                 :::*                    LISTEN      1657354/python     

服务管理:参考

$ sudo /usr/local/nebula/scripts/nebula.service
[-v] [-c <config_file_path>]
<start | stop | restart | kill | status>
<metad | graphd | storaged | all>
 

检查状态:

(base) root@ubuntu:/usr/local/nebula/etc#  sudo /usr/local/nebula/scripts/nebula.service status all
[WARN] The maximum files allowed to open might be too few: 1024
[INFO] nebula-metad(fa928930a): Running as 1909079, Listening on 9559
[INFO] nebula-graphd(fa928930a): Running as 1909140, Listening on 9669
[WARN] nebula-storaged after v3.0.0 will not start service until it is added to cluster.
[WARN] See Manage Storage hosts:ADD HOSTS in https://docs.nebula-graph.io/
[INFO] nebula-storaged(fa928930a): Running as 1909205, Listening on 9779


下载 nebula-console 二进制文件:

https://github.com/vesoft-inc/nebula-console/releases/download/v3.8.0/nebula-console-linux-amd64-v3.8.0

起名为:nebula-console-shell

chmod 777 nebula-console-shell

链接数据库:

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

退出 “:quit”

http://www.lryc.cn/news/387193.html

相关文章:

  • 拆分盘投资策略解析:机制、案例与风险考量
  • Redis主从复制、哨兵模式以及Cluster集群
  • 【chatgpt】npy文件和npz文件区别
  • 为什么IP地址会被列入黑名单?
  • 【OceanBase诊断调优】—— 如何查找表被哪些其它表引用外键
  • 网络编程常见问题
  • 回调函数的使用详解
  • <电力行业> - 《第8课:输电(一)》
  • 【python学习】 __pycache__ 文件是什么
  • 论文阅读_基本于文本嵌入的信息提取
  • kafka学习笔记08
  • Flask的 preprocess_request
  • 重温react-05(类组件生命周期和性能优化)
  • RHCE四---web服务器的高级优化方案
  • Pytest集成Allure生成测试报告
  • SpringBoot 参数校验
  • 【Arduino】实验使用ESP32控制可编程继电器制作跑马灯(图文)
  • islower()方法——判断字符串是否全由小写字母组成
  • 发布/订阅模式
  • K8S Pod常见状态
  • Hadoop3:Yarn常用Shell命令
  • 15.数据库简介+MySQl使用+SQL语句
  • AI入门系列:工具篇之ChatGPT的优秀的国内替代品
  • 改机软件有哪些?实现一键新机、改串号、改IMEI和手机参数的需求 硬改手机软件,新机环境模拟 设备伪装,一键改机,一键复原
  • 如何快速使用JNI
  • simulink开发stm32,使用中断模块,无法产生中断,其中包括使用timer模块,以及ADC都无法产生中断,需要注意的地方
  • C# 如何单纯的优化循环
  • 【鸿蒙学习笔记】@Extend装饰器:定义扩展组件样式
  • 【Docker项目实战篇】Docker部署PDF多功能工具Stirling-PDF
  • 【算法训练记录——Day37】