How to install Cassandra php driver

Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.

We need to install the additoinal driver for using cassandra with php.

This article explains the detailed steps to install php driver for cassandra.

The Cassandra PHP Extension depends on the following libraries:

The C/C++ driver and its dependencies.
The GNU Multiple Precision Arithmetic Library.

Step1: Install the dependencies.

#yum install automake cmake gcc gcc-c++ libtool openssl-devel wget gmp gmp-devel boost php-devel pcre-devel
#pushd /tmp
#tar xzf libuv-v1.4.2.tar.gz
#pushd libuv-v1.4.2
#sudo make install

Step2: Install php driver.

#pecl install cassandra

You can also use PECL to install the driver from source by specifying the provided package.xml file path as the argument to pecl install command.

#git clone
#cd php-driver
#pecl install ext/package.xml

That's all...

Leave a Reply