August 12, 2011
Install the server
apt-get install mongodb-server
Before install the PHP driver a couple of packages you'll need:
apt-get install php5-dev build-essential php-pear
Now time to compile/install the driver:
pecl install mongo
Once it finishes it will display the location of the new extension. Something like:
/usr/lib/php5/20090626/mongo.so
Finally add this to your php.ini (/etc/php5/cgi/php.ini):
extension=/usr/lib/php5/20090626/mongo.so
Now restart your web server and that's should be it!
I'm a 32-years old programmer and web developer currently living in Montevideo, Uruguay. I been programming since I was about 15 y.o, and for the past 12 actively working in the area.