Installation Method Reference:
http://php.net/manual/en/mongo.installation.php
Tar Driver package Links:
GitHub: Driver Links
Pecl:http://pecl.php.net/package/mongo
RPM Driver Package Link: http://downloads-distro.mongodb.org/repo/redhat/os/
Centos,redhat Recommended rpm
How to install the TAR package:
[Email protected]]# TAR-ZXVF mongo-php-driver-1.5.8.tar.gz
[Email protected]]# CD mongo-php-driver-1.5.8
Find your own installed phpize (as determined by your own installation directory)
[email protected] localhost mongo-php-driver-1.5.8]#/usr/local/php56/bin/phpize
Configuring for:
PHP Api version:20131106
Zend Module Api no:20131226
Zend Extension Api no:220131226
[Email protected] mongo-php-driver-1.5.8]#
./configure--enable-mongo=share--with-php-config=/usr/local/php56/bin/php-config
[[email protected] mongo-php-driver-1.5.8]# make
Build complete.
Don ' t forget to run ' make test '.
[[email protected] localhost mongo-php-driver-1.5.8]# make install
Installing Shared extensions:/usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226/
Description installation Successful Next configuration php.ini
Edit PHP.ini Join
Extension=mongo.so
Restart PHP-FPM
Pkill PHP-FPM
/usr/local/php/sbin/php-fpm
Verification: Php–m
Check if the terminal output has MONGO, if yes, prove OK
MongoDB PHP Driver