pear php 扩展
最后更新于:2022-04-02 02:33:56
[TOC]
## 安装
```
curl -O https://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
```
```
...
1. Installation base ($prefix) : /usr
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /usr/bin
5. PHP code directory ($php_dir) : /usr/share/pear
6. Documentation directory : /usr/docs
7. Data directory : /usr/data
8. User-modifiable configuration files directory : /usr/cfg
9. Public Web Files directory : /usr/www
10. System manual pages directory : /usr/man
11. Tests directory : /usr/tests
12. Name of configuration file : /private/etc/pear.conf
1-12, 'all' or Enter to continue: 1
```
输入 1,将安装根目录修改为 /usr/local/pear;
输入 4,将命令安装到 /usr/local/bin 目录;
其它选项默认即可,一路回车。
## 命令
```
// 版本检测
pear version
// 升级或更新源
pear upgrade --force PEAR
// 更新下仓库
pecl channel-update pecl.php.net
// 安装包
pear install DB
```
';