安装 MongoDB, Mongo PHP Driver on MAMP

1. Add MAMP’s bin to the $PATH, make suit with your PHP version:

export PATH="/Applications/MAMP/bin/php/php5.x.x/bin:$PATH"

2. Download PHP source same with your PHP version and put into /Applications/MAMP/bin/php/php5.x.x/include
3. Configure PHP:

cd /Applications/MAMP/bin/php/php5.x.x/include/php
./configure

4. When finish, install mongodb:

sudo pecl install mongo

5. Go to MAMP and edit template PHP.ini and add mongodb extension:

extension=mongo.so

6. Restart your MAMP and you check phpinfo() to make sure mongodb extension installed perfectly.

7.安装Mongo PHP Driver

sudo pecl install mongodb

 然后去php.ini里面添加

extension=mongodb.so

 ok重新服务器搞定。

posted @ 2016-04-10 18:25  吴魁  阅读(907)  评论(0编辑  收藏  举报