【问题标题】:Installing PHP driver for Cassandra on MAMP在 MAMP 上为 Cassandra 安装 PHP 驱动程序
【发布时间】:2015-07-03 08:34:26
【问题描述】:
【问题讨论】:
标签:
php
cassandra
mamp
mamp-pro
【解决方案1】:
好吧,就这样吧:
首先,我必须在 MAMP 上配置我的 php 以使用 MAMP 未附带的适当 php 源进行配置
- 我在 MAMP 上更改为最新的 PHP 版本,对我来说是 5.6.10,还将我的 PATH 变量更改为 php 的新 bin:
/Applications/MAMP/bin/php/php5.6.10/bin/
- 下载 php 5.6.10 源,解压并将文件夹重命名为“
php”
- 导航到
/Applications/MAMP/bin/php/php5.6.10 并创建了一个名为“include”的目录 - 将下载的php 文件夹复制到其中
- cd
/Applications/MAMP/bin/php/php5.6.10/include/php 并运行 ./configure
然后按照此处的说明进行操作:https://github.com/datastax/php-driver/blob/master/ext/README.md
- 在终端中,运行:
brew install libuv cmake gmp
- 在有意义的目录中,运行:
git clone https://github.com/datastax/php-driver.git
cd php-driver
git submodule update --init
cd ext
./install.sh
phpize
./configure
make install
然后编辑php.ini添加进去:extension=cassandra.so