Skip to main content

Hướng dẫn cài đặt RocksDB trên RHEL/Centos 7

Hướng dẫn cài đặt CSDL RocksDB trên môi trường hệ điều hành Redhat/Centos 7

rocksdb.png

Yêu cầu:

  • Java: OpenJDK 1.7+ (required only for RocksJava)
  • Tools:
    • curl (recommended; required only for RocksJava)
  • Libraries:
    • gflags 2.0+ (required for testing and benchmark code)
    • zlib 1.2.8+ (optional)
    • bzip2 1.0.6+ (optional)
    • lz4 r131+ (optional)
    • snappy 1.1.3+ (optional)
    • zstandard 0.5.1+ (optional)
  • Architecture: x86 / x86_64 / arm64 / ppc64le / s390x
  • C/C++ Compiler: GCC 4.8+ or Clang
  • Tools:
    • GNU Make or CMake 3.14.5+

Hướng dẫn cài đặt

-Cài gói gcc4.8:
yum install gcc48-c++
- Cài gói gflags:
cd /tmp/
git clone https://github.com/gflags/gflags.git
cd gflags
git checkout v2.0
./configure && make && sudo make install
- Thiết lập path:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
- Cài gói snappy:
sudo yum install snappy snappy-devel
- Cài gói zlib:
sudo yum install zlib zlib-devel
- Cài gói bzip2:
sudo yum install bzip2 bzip2-devel
- Cài gói lz4:
sudo yum install lz4-devel
- Cài gói ASAN (optional for debugging):
sudo yum install libasan
- Cài gói zstandard:
cd /tmp/
wget https://github.com/facebook/zstd/archive/v1.1.3.tar.gz
mv v1.1.3.tar.gz zstd-1.1.3.tar.gz
tar zxvf zstd-1.1.3.tar.gz
cd zstd-1.1.3
make && sudo make install
- Cài đặt RocksDB:
cd /tmp/
git clone https://github.com/facebook/rocksdb.git
cd rocksdb
make static_lib

Tham khảo

[1] https://github.com/facebook/rocksdb/blob/master/INSTALL.md