Install Apache Thrift and Cassandra in Ubuntu

  • SumoMe

How to install apache thrift and cassandra in ubuntu

What is thrift?

The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.

To install Thrift in Ubuntu with support for Erlang, haskell, c++, C, perl and php:

sudo apt-get install erlang php-cli php-common
sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
sudo apt-get install ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev
sudo apt-get install libbit-vector-perl libglib2.0-dev
sudo apt-get install mono-gmcs libmono-system-web2.0-cil

Get the latest source:

wget https://dist.apache.org/repos/dist/release/thrift/0.8.0/thrift-0.8.0.tar.gz -O thrift.tar.gz
tar -xzf thrift.tar.gz
cd thrift-0.8.0
./configure --without-ruby --without-go
make
sudo make install

Notice because my system already had Ruby and Go Language installed I needed to exclude them from being used during compilation.

Install Cassandra

What is Cassandra? The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance. Linear scalability and proven fault-tolerance on commodity hardware or cloud infrastructure make it the perfect platform for mission-critical data. Cassandra’s support for replicating across multiple datacenters is best-in-class, providing lower latency for your users and the peace of mind of knowing that you can survive regional outages.

Installing Cassandra in Ubuntu is a bit more straightforward:

sudo nano /etc/apt/sources.list.d/apache.cassandra.list

add:

deb http://www.apache.org/dist/cassandra/debian 10x main
deb-src http://www.apache.org/dist/cassandra/debian 10x main

Get the key:

gpg --keyserver wwwkeys.pgp.net --recv-keys 4BD736A82B5C1B00
sudo apt-key add ~/.gnupg/pubring.gpg

To install it:

sudo apt-get update && sudo apt-get install cassandra

Why Cassandra? Well, I found it to meet all of my requirements. MongoDB was a good candidate as well.

So why do we need to install thrift and Casssandra in Ubuntu? You’ll see soon enough but what’s to come is pretty awesome because we are going to build a very robust, concurrent and scalable application!

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Install Apache Thrift and Cassandra in Ubuntu, 10.0 out of 10 based on 1 rating

Author: Luis Tineo

Husband, Father, performance improvement junkie, biker and video gamer, Linux user and in my day job I'm a Systems Architect at Blue Acorn.

Share This Post On