1.先进入php安装的bin目录
cd /usr/local/php/bin/
2. 下载php安装pecl的脚本
wget http://pear.php.net/go-pear.phar -O go-pear.php
3.安装pecl
php go-pear.php
这时候会提示是否安装到这些目录下
1. Installation base ($prefix) : /usr/local/php
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /usr/local/php/bin
5. PHP code directory ($php_dir) : /usr/local/php/share/pear
6. Documentation directory : /usr/local/php/docs
7. Data directory : /usr/local/php/data
8. User-modifiable configuration files directory : /usr/local/php/cfg
9. Public Web Files directory : /usr/local/php/www
10. System manual pages directory : /usr/local/php/man
11. Tests directory : /usr/local/php/tests
12. Name of configuration file : /usr/local/php/etc/pear.conf
翻译版
1.php安装的目录 : /usr/local/php
2.用于处理的临时目录 : /tmp/pear/install
3. 下载的临时目录 : /tmp/pear/install
4. 二进制文件目录(就是pecl的安装目录) : /usr/local/php/bin
5. PHP代码目录($PHP_dir) : /usr/local/php/share/pear
6.文档目录 : /usr/local/php/docs
7.数据目录 : /usr/local/php/Data
8.用户可修改的配置文件目录 : /usr/local/php/cfg
9.公共Web文件目录 : /usr/local/php/www
10.系统手册页目录 : /usr/local/php/man
11.测试目录 : /usr/local/php/Tests
12.配置文件名 : /usr/local/php/etc/pear.conf
4. pecl基本命令
pecl search key-word #查找扩展
pecl install key-word #安装扩展
网友评论