2 ############################################
4 ############################################
6 for package in "$@" ; do
12 function install_one() {
13 case $(lsb_release -si) in
15 sudo apt-get install -y --force-yes "$@"
17 CentOS|Fedora|RedHatEnterpriseServer)
18 sudo yum install -y "$@"
21 sudo zypper --non-interactive install "$@"
24 echo "$(lsb_release -si) is unknown, $@ will have to be installed manually."
28 ############################################
29 # Install required tools
30 ############################################
31 echo "Install required tools"
36 ############################################
37 # Compile&Start RocksDB
38 ############################################
39 # install prerequisites
41 case $(lsb_release -si) in
43 install g++-4.7 libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev librados-dev
45 CentOS|Fedora|RedHatEnterpriseServer)
46 install gcc-c++.x86_64 gflags-devel snappy-devel zlib zlib-devel bzip2 bzip2-devel librados2-devel.x86_64
49 echo "$(lsb_release -si) is unknown, $@ will have to be installed manually."
54 # sudo yum install gflags-devel
56 # wget https://github.com/schuhschuh/gflags/archive/master.zip
59 # mkdir build && cd build
60 # export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
61 # make && make install
66 echo "Compile rocksdb"
67 if [ -e rocksdb ]; then
70 git clone https://github.com/facebook/rocksdb.git --depth 1
74 make env_librados_test ROCKSDB_USE_LIBRADOS=1 -j8
79 if [ -f "/etc/ceph/ceph.conf" ]; then
80 cp /etc/ceph/ceph.conf ../ceph/src/
81 elif [ -f "/etc/ceph/ceph/ceph.conf" ]; then
82 cp /etc/ceph/ceph/ceph.conf ../ceph/src/
84 echo "/etc/ceph/ceph/ceph.conf doesn't exist"
87 echo "Run EnvLibrados test"
89 if [ -f "../ceph/src/ceph.conf" ]
91 cp env_librados_test ~/cephtest/archive
94 echo "../ceph/src/ceph.conf doesn't exist"