Cassandra, thrift and PHP on Ubuntu

Download Thrift and Cassandra

thrift

http://incubator.apache.org/thrift/

cassandra

http://cassandra.apache.org/


apt-get install sun-java6-jdk sun-java6-jre
apt-get install libboost-dev automake libtool flex bison pkg-config g++ apache2 php5 php5-cli

unzip thrift
cd thrift

./configure
make


./compiler/cpp/thrift -gen php ../PATH-TO-CASSANDRA/interface/cassandra.thrift


cd lib/php/src/ext/thrift_protocol/


apt-get install php5-dev

phpize
./configure –enable-thrift_protocol
make


sudo cp modules/thrift_protocol.so /usr/lib/php5/20060613/


vi /etc/php5/conf.d/thrift_protocol.ini
extension=thrift_protocol.so

Advertisements
Cassandra, thrift and PHP on Ubuntu