brpc的安装---20220620可用

参考文档:
官方文档:https://github.com/apache/incubator-brpc/blob/master/docs/cn/getting_started.md
https://developer.aliyun.com/article/939759
环境配置:centos

安装步骤:

  1. 下载brpc源码包:https://gitee.com/baidu/BRPC?_from=gitee_search
  2. 安装依赖项:
    • sudo yum install epel-release
    • sudo yum install git gcc-c++ make openssl-devel gflags-devel protobuf-devel protobuf-compiler leveldb-devel
  3. 安装brpc
    • mkdir bld
    • cd bld
    • cmake3 -DBUILD_SHARED_LIBS=ON ..
    • make -j 8
    • sudo make install

测试

进入examples找个例子试一下即可

Tips

  • 安装gperftools,yum install gperftools,在brpc给的examples中的http_c++中需要用到,没有这个会编译报错
posted @ 2022-06-21 17:39  荒唐了年少  阅读(250)  评论(0编辑  收藏  举报