安装 clang9

wget https://releases.llvm.org/9.0.0/clang%2bllvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
tar -xvf clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
cd clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04
sudo mkdir /usr/lib/llvm-9
sudo cp -r ./* /usr/lib/llvm-9

ProtoBuf

sudo apt-get install autoconf automake libtool -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig

gRPC 编译

参考官网 quick-start

  • 需要指定版本号 v1.20.0
  • configure 需要进行打包配置(package),这个需要参考
## 安装依赖包
sudo apt-get install golang
sudo apt install autoconf automake libtool shtool 

git clone --recurse-submodules -b v1.20.0 https://github.com/grpc/grpc
cd grpc

mkdir -p ./cmake/build
cd ./cmake/build
cmake -DgRPC_INSTALL=ON \
      -DgRPC_BUILD_TESTS=OFF \
      -DgRPC_PROTOBUF_PROVIDER=package \
      -DgRPC_ZLIB_PROVIDER=package \
      -DgRPC_CARES_PROVIDER=package \
      -DgRPC_SSL_PROVIDER=package \
      -DCMAKE_BUILD_TYPE=Release \
      ../..
      
make -j
sudo make install

libcurl

git clone https://github.com/curl/curl.git
cd curl
./buildconf
./configure --without-ssl --without-libidn2 --without-zlib
make -j
sudo make install
cd include # ONLY install the include folder (with curl.h, etc)
make install

pistache

git clone https://github.com/oktal/pistache.git
cd pistache
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install

hiredis

git clone https://github.com/redis/hiredis.git

make USE_SSL=1

OpenSSL 编译

访问官网,下载对应版本号

wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1.tar.gz
tar -xzvf openssl-1.1.1.tar.gz
cd openssl-1.1.1
./config --prefix=/usr/local --openssldir=/usr/local/openssl
make -j && make install

RabbitMQ

安装 Erlang

wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add -

## Ubuntu 20.04:
echo "deb https://packages.erlang-solutions.com/ubuntu focal contrib" | sudo tee /etc/apt/sources.list.d/rabbitmq.list

## Ubuntu 18.04:
echo "deb https://packages.erlang-solutions.com/ubuntu bionic contrib" | sudo tee /etc/apt/sources.list.d/rabbitmq.list

sudo apt update
sudo apt install erlang

安装 rabbitmq-c

使用 rabbitmq-c

sudo apt-get install libssl-dev

git clone https://github.com/alanxz/rabbitmq-c  
cd rabbitmq-c
mkdir build
cd build
cmake ..
cmake --build .
make -j
sudo make install