1 Step : Installing MongoDB:
1 sudo apt-get update
2 sudo apt-get install mongodb
2 Step : Install PHP developers' modules
$sudo apt-get install php5-dev php5-cli php-pear libapache2-mod-php5
3 Step : Install Mongo-PHP package
$sudo apt-get install php5-mongo
4 Step : install mongo-php-driver-master manually
$cd /home/indianic/Download/mongo-php-driver-master
$sudo phpize
$./configure
$sudo make install
5 Step : Tell PHP to use mongo, add "extension=mongo.so" to php.ini
$sudo nano /opt/lampp/etc/php.ini >
extension=/usr/lib/php5/20121212+lfs/mongo.so
and save
6 Step : sudo /opt/lampp/lampp restart
How i can install mongodb in php version 7.2 ?
ReplyDelete