setup_postgres.sh 888 B

123456789101112131415161718
  1. #!/bin/bash
  2. export BOOST_ROOT=/usr/local
  3. export BOOST_INC=${BOOST_ROOT}/include
  4. export BOOST_LIB=${BOOST_ROOT}/lib
  5. export WT_ROOT=${IROOT}/wt
  6. export WT_LIB=${WT_ROOT}/lib
  7. export WT_INC=${WT_ROOT}/include
  8. # This has to be included here since it is one of the vars NOT copied from the original environment
  9. export LD_LIBRARY_PATH="${BOOST_LIB}:${WT_LIB}:${LD_LIBRARY_PATH}"
  10. export CPLUS_INCLUDE_PATH=/usr/include/postgresql:/usr/include/postgresql/9.3/server:$CPLUS_INCLUDE_PATH
  11. sed -i 's|INSERT_DB_HOST_HERE|'"${DBHOST}"'|g' benchmark.cpp
  12. g++-4.8 -O3 -DNDEBUG -DBENCHMARK_USE_POSTGRES -std=c++0x -L${BOOST_LIB} -I${BOOST_INC} -L${WT_LIB} -I${WT_INC} -o benchmark_postgres.wt benchmark.cpp -lwt -lwthttp -lwtdbo -lwtdbopostgres -lboost_thread
  13. ./benchmark_postgres.wt -c wt_config.xml -t ${MAX_THREADS} --docroot . --http-address 0.0.0.0 --http-port 8080 --accesslog=- --no-compression &