linux php7编译安装mongodb扩展

发表于

原文链接:http://zixuephp.net/article-375.html

cd /
wget -c https://pecl.php.net/get/mongodb-1.3.4.tgz
#解压
tar -xzvf mongodb-1.3.4.tgz
cd mongodb-1.3.4
#生成配置文件
/usr/local/php/bin/phpize
#配置
./configure --with-php-config=/usr/local/php/bin/php-config
#编译和安装
make && make install

vim /usr/local/php/etc/php.ini
#文件里最底部添加引用
extension=mongodb.so
#保存退出
:wq
service php-fpm restart
service nginx restart
service mongod restart

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注