4 ############################################
6 ############################################
7 source $
(dirname $0)/..
/ceph-helpers-root.sh
9 ############################################
10 # Install required tools
11 ############################################
12 echo "Install required tools"
16 ############################################
17 # Compile&Start RocksDB
18 ############################################
19 # install prerequisites
23 install git g
++ libsnappy-dev zlib1g-dev libbz2-dev libradospp-dev
24 case $
(distro_version
) in
26 install_cmake3_on_xenial
34 install git gcc-c
++.x86_64 snappy-devel zlib zlib-devel
bzip2 bzip2-devel libradospp-devel.x86_64
35 if [ $
(distro_id
) = "fedora" ]; then
38 install_cmake3_on_centos7
42 install git gcc-c
++ snappy-devel zlib-devel libbz2-devel libradospp-devel
45 echo "$(distro_id) is unknown, $@ will have to be installed manually."
50 # sudo yum install gflags-devel
52 # wget https://github.com/schuhschuh/gflags/archive/master.zip
55 # mkdir build && cd build
56 # export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
57 # make && make install
62 echo "Compile rocksdb"
63 if [ -e rocksdb
]; then
66 git clone https
://github.com
/facebook
/rocksdb.git
--depth 1
70 if type cmake3
> /dev
/null
2>&1 ; then
75 mkdir build
&& cd build
&& ${CMAKE} -DWITH_LIBRADOS=ON
-DWITH_SNAPPY=ON
-DWITH_GFLAGS=OFF
-DFAIL_ON_WARNINGS=OFF ..
76 make rocksdb_env_librados_test
-j8
81 if [ -f "/etc/ceph/ceph.conf" ]; then
82 cp /etc
/ceph
/ceph.conf ..
/ceph
/src
/
83 elif [ -f "/etc/ceph/ceph/ceph.conf" ]; then
84 cp /etc
/ceph
/ceph
/ceph.conf ..
/ceph
/src
/
86 echo "/etc/ceph/ceph/ceph.conf doesn't exist"
89 echo "Run EnvLibrados test"
91 if [ -f "../ceph/src/ceph.conf" ]
93 cp env_librados_test ~
/cephtest
/archive
96 echo "../ceph/src/ceph.conf doesn't exist"