RocksDB编译运行
环境:CentOS 7
C++11支持
直接通过make/make all会生成debug模式,这会比release模式慢
环境准备
安装g++,确保g++版本足够新
yum install gcc48-c++
g++ --version
安装RocksDB所需的依赖
git
由于需要从github获取所以需要先安装git
yum install git
gflags
git clone https://github.com/gflags/gflags.git
cd gflags
./configure && make && make install
后来更新了gflags需要用cmake进行编译,修改之后的步骤:
mkdir build
cmake ..
make&&make install
snappy
yum install snappy snappy-devel
zlib
yum install zlib zlib-devel
bzip2
yum install bzip2 bzip2-devel
lz4
yum install lz4-devel
ASAN
yum install libasan
zstandard:
wget https://github.com/facebook/zstd/archive/v1.1.3.