First install the MONGODB server:
1. Brew Install MongoDB
2, modify the vim/usr/local/etc/mongod.conf file, DB Road strength
3, create, modify/data/db, and for writable permission;
4, start the service side. Brew Services Start MongoDB
Installing the MongoDB Extension for PHP
1, Http://pecl.php.net/package/mongo Download the latest MONGO package;
2. Enter into this directory, enter:/applications/mamp/bin/php/php5.6.30/bin/phpize
3,./configure--with-php-config=/applications/mamp/bin/php/php5.6.30/bin/php-config
4. Make
5. Sudo make install
6, after the installation is successful, mongo.so will be copied to the/applications/mamp/bin/php/php5.6.30/lib/php/extensions/no-debug-non-zts-20131226 directory.
7, configuration Mamp php.ini;
8, restart Apache, you can see the MONGO service.
9.
When installing the MONGO extension, if you are prompted for a missing OpenSSL file, you can copy the OpenSSL folder in the Mamp to the installation directory
The OpenSSL folder under the Mamp directory
Copy to the installation directory
Mac installation of Mamp MongoDB