# 基础软件安装
apt install gcc g++ gdb openssl libssl-dev automake autoconf make libboost-dev libmysqlclient-dev libsqlite3-dev unzip openjdk-8-jdk ant
cp -r /usr/include/boost /usr/local/include/
cd /usr/lib/x86_64-linux-gnu/
ln -s libmysqlclient.so.20.3.17 libmysqlclient_r.so

# cmake
wget https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3.tar.gz
tar -zxvf cmake-3.17.3.tar.gz 
cd cmake-3.17.3/
./configure 
make -j2
make install

# hiredis-vip
wget https://github.com/vipshop/hiredis-vip/archive/0.3.0.tar.gz -O hiredis-vip.tar.gz
tar -zxvf hiredis-vip.tar.gz
cd hiredis-vip-0.3.0/
make
make install

# jemalloc
wget https://github.com/jemalloc/jemalloc/archive/5.0.1.tar.gz
tar -zxvf jemalloc-5.0.1.tar.gz 
cd jemalloc-5.0.1/
./autogen.sh
./configure
make -j2
make install

# ragel
wget http://www.colm.net/files/ragel/ragel-6.10.tar.gz
tar -zxvf ragel-6.10.tar.gz 
cd ragel-6.10/
./configure
make -j2
make install

# protobuf
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.12.3/protobuf-cpp-3.12.3.tar.gz
tar -zxvf protobuf-cpp-3.12.3.tar.gz 
cd protobuf-3.12.3/
./configure
make
make install

# libevent
wget https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
tar -zxvf libevent-2.1.11-stable.tar.gz 
cd libevent-2.1.11-stable/
./autogen.sh 
./configure
make
make install

# tinyxml2
wget https://github.com/leethomason/tinyxml2/archive/8.0.0.tar.gz -O tinyxml2-8.0.0.tar.gz
tar -zxvf tinyxml2-8.0.0.tar.gz
cd tinyxml2-8.0.0/
make
make install

# jsoncpp
wget https://github.com/open-source-parsers/jsoncpp/archive/1.9.3.tar.gz -O jsoncpp-1.9.3.tar.gz
tar -zxvf jsoncpp-1.9.3.tar.gz 
cd jsoncpp-1.9.3/
mkdir build
cd build/
cmake ..
make install

# yaml-cpp
wget https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.6.3.tar.gz
tar -zxvf yaml-cpp-0.6.3.tar.gz
cd yaml-cpp-yaml-cpp-0.6.3/
mkdir build
cd build/
cmake ..
make
make install

# cppunit
https://pan.baidu.com/s/1PUENnVGsN85L8NngrO4gyA k3gz
tar -zxvf cppunit-1.12.1.tar.gz cppunit-1.12.1/
cd cppunit-1.12.1/
./configure LDFLAGS='-ldl'
make
make install

# zookeeper
wget https://github.com/apache/zookeeper/archive/release-3.5.8.tar.gz
tar -zxvf release-3.5.8.tar.gz
cd zookeeper-release-3.5.8/
ant compile_jute
cd zookeeper-client/zookeeper-client-c/
autoreconf -if
ACLOCAL="aclocal -I /usr/local/share/aclocal" autoreconf -if
ACLOCAL_PATH=/usr/local/share/aclocal autoreconf -if
ACLOCAL_FLAGS="-I /usr/local/share/aclocal" autoreconf -if
./configure
make
make install