比如安装MongoDB扩展
命令行下输入:
[#] /usr/local/php/bin/pecl install mongodb ......嗒吧嗒吧一大堆输出后 Build process completed successfully Installing '/usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/mongodb.so' install ok: channel://pecl.php.net/mongodb-1.5.5 configuration option "php_ini" is not set to php.ini location You should add "extension=mongodb.so" to php.ini
在php.ini加入提示
extension=mongodb.so
卸载命令输入:
[l]# /usr/local/php/bin/pecl uninstall mongodb Unable to remove "extension=mongodb.so" from php.ini uninstall ok: channel://pecl.php.net/mongodb-1.5.5
此时MongoDB已被删除,扩展目录下的mongodb.so文件也不存在了。
php-fpm记得重启下