macOS - pecl
安装 pecl
1 | curl -O http://pear.php.net/go-pear.phar |
安装选项修改
- 将
$prefix设置为/usr/local/pear

安装完毕后,建立软链接
1 | ln -s /usr/local/pear/bin/pecl /usr/local/bin/ |
使用前准备
- 使用
pecl安装php扩展时,会调用php、php-config、phpize - 若工作环境使用的
php非系统自带,需要先确保相关文件存在于环境变量目录中 - 使用 brew 安装
php会对php建立软链接,但没对php-config和phpize建立
1 |
|
安装扩展
1 | ## 安装 php-redis |