Skip to content

Instantly share code, notes, and snippets.

@deepakaryan1988
Created November 7, 2014 09:54
Show Gist options
  • Save deepakaryan1988/4d532eb22d7689bfbbb5 to your computer and use it in GitHub Desktop.
Save deepakaryan1988/4d532eb22d7689bfbbb5 to your computer and use it in GitHub Desktop.
Install mongo DB and driver with MAMP support
Source:- http://toodlepip.co.uk/2014/installing-mongo-mongo-php-mac-osx-mavericks-mamp/
Step:-
1. brew install mongodb
2. brew install autoconf
3. curl -O http://museum.php.net/php5/php-5.5.3.tar.gz
4. cd /Applications/MAMP/bin/php/php5.5.3/
5. mkdir include
6. cd include
7. mkdir php
8. cd /Applications/MAMP/bin/php/php5.5.3/include/php
9. ./configure
10. cd /Applications/MAMP/bin/php/php5.5.3/bin
11. sudo pecl install mongo
12. After installing pecl mongo see the installing extension dir of mongo.so and copy it in your MAMP directory and my case, it is:-
cp /usr/lib/php/extensions/no-debug-non-zts-20121212/mongo.so /Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/
13. export PATH=/Applications/MAMP/bin/php/php5.x.x/bin:$PATH
14. goto /Applications/MAMP/conf/php5.5.3. and find php.ini ---> add extension=mongo.so in extension.
15. For checking created test.php and add below lines:-
<?php
phpinfo();
?>
16. restart your MAMP and goto localhost/test.php
17. Yipee!!! you would find mongo extension and you are done!! :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment