Skip to content

Instantly share code, notes, and snippets.

@betapcode
Last active August 24, 2017 02:26
Show Gist options
  • Save betapcode/2dca0b996dc0015af5fdb5f74a360dc1 to your computer and use it in GitHub Desktop.
Save betapcode/2dca0b996dc0015af5fdb5f74a360dc1 to your computer and use it in GitHub Desktop.
scribe installation script on CentOS
#!/bin/bash
echo '=================================================='
echo '===============Install necessary tools==============='
echo '=================================================='
sudo yum update
sudo yum install git make flex bison libtool automake openssl-devel libevent libevent-devel python-devel gcc-c++ byacc java-1.7.0-openjdk ant
echo '=================================================='
echo '===============update autoconf==============='
echo '=================================================='
cd ~
sudo rpm -e --nodeps `rpm -qf /usr/bin/autoconf`
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar xzf autoconf-2.69.tar.gz
cd autoconf-2.69/
./configure
make
sudo make install
echo '=================================================='
echo '===============install boost==============='
echo '=================================================='
cd ~
wget http://jaist.dl.sourceforge.net/project/boost/boost/1.45.0/boost_1_45_0.tar.gz
tar xzf boost_1_45_0.tar.gz
cd boost_1_45_0/
./bootstrap.sh
sudo ./bjam install
echo '=================================================='
echo '===============install thrift==============='
echo '=================================================='
cd ~
git clone https://github.com/apache/thrift.git
cd thrift/
git fetch
git branch -a
git checkout 0.8.x
./bootstrap.sh
./configure --with-java
make
sudo make install
cd lib/py/
sudo python setup.py install
echo '=================================================='
echo '===============install fb303==============='
echo '=================================================='
cd ~/thrift/contrib/fb303/
./bootstrap.sh
./configure CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H"
make
sudo make install
cd py/
sudo python setup.py install
echo '=================================================='
echo '===============install scribe==============='
echo '=================================================='
cd ~
git clone https://github.com/facebook/scribe.git
cd scribe/
echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf
ldconfig
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
#./bootstrap.sh
# or (show error: configure: error: Could not link against !)
./bootstrap.sh --with-boost-filesystem=boost_filesystem
#./configure CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DBOOST_FILESYSTEM_VERSION=2" LIBS="-lboost_system -lboost_filesystem"
#or (show error: configure: error: Could not link against !)
./configure CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DBOOST_FILESYSTEM_VERSION=2" --with-boost-filesystem=boost_filesystem
make
sudo make install
mkdir -p /etc/scribed
cp examples/example1.conf /etc/scribed/scribe.conf
cd lib/py/
sudo python setup.py install
cd ~
echo '=================================================='
echo '===================== Done! ======================='
echo '=================================================='
@betapcode
Copy link
Author

betapcode commented Aug 24, 2017

error: #error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3

Fix:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment