Installing Apache thrift, Cassandra 2.x and YACassandra-PDO on CentOS 6.5+

Hello,

Well after a long time this is my in length article, the reason I am writing is because of all the stuff I have been gone through building thrift and cassandra-pdo on centOS 6.5

Versions

I will be writing about installing latest version of thrift that at time of writing and RnD was 0.9.1, CentOS is version 6.5 64 bit, php 5.3.3,  Apache/2.2.15, Cassandra is at version 2.06 which is most stable version for production at the time of writing.

 

Prerequisite

Most of the commands will need elevated privileges. You should prefix sudo with every command, I am doing it on test VM so doing it as privileged user root

Packages wget, nano are available if not then yum install them as shown below. Of course if you use vi or other util other than wget to download files then skip this

Ok so lets get started.

When I started building thrift, or cassandra pdo I was getting all sort of errors such as

 

Install Cassandra

Installing cassandra is the simplest one, We will be installing it from rpm provided by datastax

Open datastax.repo for editing with following command

paste following content in editor

 Install cassandra

Above command will also install openJDK but cassandra guys recommend that we should use latest java from Oracle so lets do that now

Get into opt directory You can actually choose to be any other directory of your liking

Get RPM path for latest jre  from http://www.oracle.com/technetwork/java/javase/downloads/index.html I am using jre 8 from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

 

output of java –version would be  something like

Lets now install Development tools

Lets now install all pre-requisites to install thrift without issues

Before you proceed you would need autoconf version of atleast 2.65 but we will install latest version of it anyway

Build and install apache thrift

Now lets get thrift source from Github as shown below and we will install it too

Ok if you don’t see any error at this step we are doing very well and we can proceed with getting and installing YACassandraPDO from github as shown below.

Still no error, awesome, lets proceed with including our compiled package with PHP.

add this line to pdo_cassandra.ini

Restart Apache

Start Cassandra service

Now you are free to query your cassandra nodes as shown below

More  info on connections and queries can be found here

https://github.com/Orange-OpenSource/YACassandraPDO/wiki

Also note that CQL3 is kinda supported with this php PDO driver. if you get php pdo is not found exception while connecting to a cassandra node make sure you have php-pdo installed

Of course you can leave your comment and possibly someone would be able to help if not me. I look forward to get any feedback or above instructions can be improved. I will make requested edits.

Trying something new isn’t easy sometimes but when it works its a nice feeling…

I hope this article helps you or atleast give you some pointers.

Regards.

VN:R_U [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:R_U [1.9.22_1171]
Rating: 0 (from 0 votes)

Comments

  1. Paul Evans says:

    We have a project that needs designing that uses speach recognition, can you help?

Speak Your Mind

*

CommentLuv badge