天天看点

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
  1. 安装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++中需要用到,没有这个会编译报错