Install MongoDB PHP driver on Debian 6 Squeeze

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!

About
Related Posts
Comments
The comments are closed on this section.
Hire me!

I'm currently open for new projects or join pretty much any project i may fit in, let me know!

Read about what I do, or contact me for details.

Categories