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

Configuring Ubuntu Server

Install SSH Server

sudo apt-get install openssh-server

Set Fixed Ip

sudo vi /etc/network/interfaces


auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254


sudo apt-get remove dhcp3-client

Configuring Ubuntu Server