Apache Cassandra Ubuntu 16

From DreamFactory
Jump to: navigation, search

This allows you to use CassandraDB databases.

  1. Make sure you have all the required packages
    • <source lang="bash">$ sudo apt-get install php7.1-dev php-pear libgmp-dev libpcre3-dev g++ make cmake libssl-dev openssl</source>
  2. Download Datastax C++ Driver
  3. Install the Datastax C++ Driver
    • <source lang="bash">sudo dpkg -i libuv_1.13.1-1_amd64.deb </source>
    • <source lang="bash">sudo dpkg -i libuv-dev_1.13.1-1_amd64.deb </source>
    • <source lang="bash">sudo dpkg -i cassandra-cpp-driver_2.7.0-1_amd64.deb </source>
    • <source lang="bash">sudo dpkg -i cassandra-cpp-driver-dev_2.7.0-1_amd64.deb </source>
  4. Install from PECL
    • <source lang="bash">$ sudo pecl install cassandra</source>
  5. Create the ini file
    • <source lang="bash">$ sudo sh -c 'echo "extension=cassandra.so" > /etc/php/7.1/mods-available/cassandra.ini'</source>
  6. Enable the extension
    • <source lang="bash">$ sudo phpenmod cassandra</source>
  7. Restart your webserver app and/or php-fpm