MongoDB and PHP Mongo Driver on MAC OSX

MongoDB is a good approach to JSON files based database management on server side.

You need just PEAR (PHP Extension and Application Repository) with PECL repository.

Steps to install PEAR (Skip if you already have):
A) Download the latest stable version from
B) Search for PEAR.php in downloaded repo.
C) Go to PEAR.php directory in terminal.
D) $ sudo php -q PEAR.php (terminal)
E) Add include_path = ".:/usr/share/pear" below ;include_path = ".:/php/includes" in php.ini file
F) Restart Apachi.

Steps to install MongoDB:
A) Download the latest stable version from :
B) Create a folder in root of terminal ( $ mkdir mongodb)
C) Extract content of file (mongodb-osx-i386-1.8.2.tgz) in this folder
D) $ cd mongo/bin/ (terminal)
E) $ mongod & (terminal)

Steps to install PECL Mongo Driver for PHP:
A) $ sudo pecl install mongo
B) In php.ini add
C) Restart Apachi.


Post a Comment