对于裸机来说,先得安装C++的编译工具
yum -y install gcc gcc-c++
下载cmake
wget https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz
tar -xzvf cmake-3.9.2.tar.gz
cd cmake-3.9.2
./configure
make && make make install
安装gflags
git clone https://github.com/gflags/gflags.git
cd gflags/
mkdir build
cd build/
cmake -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DINSTALL_HEADERS=ON -DINSTALL_SHARED_LIBS=ON -DINSTALL_STATIC_LIBS=ON ..
make && make install
压缩和解压缩的开发包:snappy
yum install snappy snappy-devel
压缩和解压缩的开发包:zlib
yum install zlib zlib-devel
基于Burrows-Wheeler 变换的无损压缩软件:bzip2
yum install bzip2 bzip2-devel
lz4压缩工具:lz4
yum install lz4-devel
Linux下内存检测工具:asan
yum install libasan
压缩工具:zstandard
wget https://github.com/facebook/zstd/archive/v1.1.3.tar.gz
tar -xzvf v1.1.3.tar.gz
cd zstd-1.1.3
make && make install
安装RocksDB
wget https://github.com/facebook/rocksdb/archive/v6.6.4.tar.gz
tar -xzvf v6.6.4.tar.gz
cd rocksdb-6.6.4/
make static_lib
make shared_lib
cp librocksdb.so.6.6.4 /usr/local/lib
ln -s librocksdb.so.6.6.4 /usr/local/lib/librocksdb.so.6
ln -s librocksdb.so.6.6.4 /usr/local/lib/librocksdb.so
编辑/etc/profile
JAVA_HOME=/home/soft/jdk1.8.0_161
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
DB_DIR=/raid/db
WAL_DIR=/raid/wal
TEMP=/raid/tmp
OUTPUT_DIR=/raid/output
JRE_HOME=${JAVA_HOME}/jre
CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
PATH=${JAVA_HOME}/bin:$PATH
export JAVA_HOME PATH LD_LIBRARY_PATH DB_DIR WAL_DIR TEMP OUTPUT_DIR
source /etc/profile
测试
cd tools/
./benchmark.sh bulkload