Search This Blog

Saturday, July 25, 2015

Install Thrift on Ubuntu

Apache Thrift is a software project spanning a variety of programming languages and use cases. The goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible.

Here are the steps to install thrift on your Ubuntu machine

sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev



Next I created a folder where to download thrift as follows

$ cd ~/Work/Servers
$ mkdir thrift
$ cd thrift
$ wget http://apache.mirror.vexxhost.com/thrift/0.9.2/thrift-0.9.2.tar.gz


$ tar -xvzf thrift-0.9.2.tar.gz




Next we put the commands to build thrift

$ ./configure 

After configure, we need to make some minor changes to one of the files.

$ cd thrift-0.9.2
$ cd lib/cpp
$ gedit thrift.pc

Modify the following line to the version below

includedir=${prefix}/include
to
includedir=${prefix}/include/thrift



$ make 
$ sudo make install 
$ thrift --help 


Now that thrift is compiled, we need to make it accessible to all programs by entering the following command

$ sudo cp /usr/local/lib/libthrift-0.9.2.so /usr/lib/



Now thrift is installed

No comments: