Installing PHP MongoDB Driver in Debian/Ubuntu

# install apache php
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
sudo apt-get install apache2 php5 libapache2-mod-php5

# install php-pear
apt-get install php5-dev php-pear

# install mongo
pecl install mongo

The pecl command will end with the message like this.

Build process completed successfully
Installing '/usr/lib/php5/20100525/mongo.so'
install ok: channel://pecl.php.net/mongo-1.4.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongo.so" to php.ini

Then, add “extension=mongo.so” to /etc/php5/apache2/php.ini

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s