Thursday, June 12, 2014

Install php_mongo In Ubuntu

This is some command line to install mongo db in Ubuntu

Install pear and php5-dev
sudo apt-get install php-pear php5-dev

Install mongo db
sudo pecl install mongo

Go to /etc/php5/mods-available
Create file mongo.ini
vi /etc/php5/mods-available/mongo.ini
Add this line
extension=mongo.so
(You can check *.so in folder /usr/lib/php ...

Go to /etc/php5/conf.d
ln -s ../../mods-available/mongo.ini

Restart web server apache2
Go luck to you


No comments:

Post a Comment