Skip to content

Instantly share code, notes, and snippets.

@robert-sh
Last active May 2, 2019 05:26
Show Gist options
  • Save robert-sh/8a3e409d4ed21b0cd050ccb6c03fe581 to your computer and use it in GitHub Desktop.
Save robert-sh/8a3e409d4ed21b0cd050ccb6c03fe581 to your computer and use it in GitHub Desktop.
Install thrift/scribe on Centos 7
#!/bin/bash
# based on https://gist.github.com/PinkyJie/5370470
echo '=================================================='
echo '===============Install necessary tools==============='
echo '=================================================='
sudo yum -y update
#sudo yum -y install git make flex bison libtool automake openssl-devel libevent libevent-devel python-devel gcc-c++ byacc java-1.7.0-openjdk ant wget
sudo yum -y install git make flex bison libtool automake openssl-devel libevent libevent-devel python-devel gcc-c++ byacc java-1.7.0-openjdk ant autoconf wget
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 checkout 0.9.0
./bootstrap.sh
./configure --with-java
make
cp ./compiler/cpp/thrifty.hh ./compiler/cpp/thrifty.h
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/
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
sudo ldconfig /usr/local/lib
./bootstrap.sh --with-boost-filesystem=boost_filesystem
./configure --with-boost-filesystem=boost_filesystem CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DBOOST_FILESYSTEM_VERSION=2" LIBS="-lboost_system -lboost_filesystem"
make
sudo make install
cd lib/py/
sudo python setup.py install
cd ~
echo '=================================================='
echo '===================== Done! ======================='
echo '=================================================='
@Felipe00
Copy link

Felipe00 commented Mar 4, 2018

Not working in fedora 27

@mourya09
Copy link

Not working on Centos 7 as well.

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