关注小众语言,记录、分享技术点滴!

0%

centos下安装php7的mongodb模块

php一共有两个模块分别为mongo和mongodb,其中php7只支持mongodb模块

1.安装依赖包

1
yum install autoconf

2.下载mongodb模块

1
2
3
wget -O mongodb-1.1.9.tgz https://pecl.php.net/get/mongodb
tar -zxvf mongodb-1.1.9.tgz
cd mongodb-1.1.9

3.编译与安装

1
2
3
4
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install

安装完成