如何在CentOS 6.5中为Apache PHP安装扩展程序pdo_cassandra。我需要PHP可以使用Cassandra DB。
答案 0 :(得分:1)
我猜测9个月之后你已经找到了解决方案或放弃了这个,但我只是在CentOS 7上为cassandra工作了一个php驱动程序
而不是pdo_cassandra扩展我使用了datastax cassandra扩展,这是我为了让它工作而做的:
安装Apache Thrift
> git clone https://github.com/apache/thrift.git
> cd thrift
> ./bootstrap.sh
> ./configure --with-lua=no
> make
> make install
安装C ++驱动程序(Cassandra)
> rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
> sudo yum install automake cmake gcc-c++ git libtool openssl-devel wget
> wget http://dist.libuv.org/dist/v1.4.2/libuv-v1.4.2.tar.gz
> tar xzf libuv-v1.4.2.tar.gz
> cd libuv-v1.4.2.tar.gz
> sh autogen.sh
> ./configure
> make install
> wget https://github.com/datastax/cpp-driver/archive/2.0.zip
> unzip 2.0.zip
> cd cpp-driver-2.0
> mkdir build
> cd build
> cmake ..
> make
> make install
> ln -s /usr/local/lib64/libcassandra.so.2 /usr/lib64/libcassandra.so.2
安装PHP驱动程序(Cassandra)
> yum -y install gmp-devel
> git clone https://github.com/datastax/php-driver.git
> cd php-driver/ext
> pecl install package.xml
> echo extension=cassandra.so > /etc/php.d/cassandra.ini
> systemctl restart httpd