下载地址:https://pecl.php.net/package/mongodb
编译安装:
1 $ tar zxvf mongodb-mongodb-php-driver-<commit_id>.tar.gz 2 $ cd mongodb-mongodb-php-driver-<commit_id> 3 [root@localhost mongo-1.6.13]# /usr/local/php/bin/phpize 4 [root@localhost mongo-1.6.13]# ./configure --with-php-config=/usr/local/php/bin/php-config 5 [root@localhost mongo-1.6.13]# make && make install
vim php.ini
加上:
1 extension=mongodb.so
https://pecl.php.net/package/mongodb