Debian
This section describes how to compile and install RocksDB 6.1.2.
- Install the dependencies.
apt install -y libsnappy-dev libzstd-dev liblz4-dev libgflags-dev make
- Obtain the RocksDB source package.
apt install git -y git config --global http.sslVerify false git clone https://gitcode.com/boostkit/rocksdb.git cd rocksdb git checkout 6.1.2-optimization
- Compile RocksDB in Release mode.
bash build.sh
By default, the Release mode is used. You can specify the compilation mode to Debug, RelWithDebInfo, or Release as required. For example, use the following command to specify the Release mode:
bash build.sh Release
- Enable features.
- After the compilation is complete, run the following command to enable KAEZstd:
export LD_LIBRARY_PATH=/usr/local/kaezstd/lib:/usr/local/lib:$LD_LIBRARY_PATH
- Check whether the feature is enabled.
ldd librocksdb.so
KAEZstd has been enabled if the following information is displayed:

- After the compilation is complete, run the following command to enable KAEZstd:
- Install RocksDB.
make install
- Use the test tool db_bench to perform a function test.
./db_bench --compression_type=zstd
Parent topic: Compiling and Installing RocksDB