freebsd下安装pear模块

wget http://pear.php.net/go-pear
php go-pear

提示

Sorry! Your PHP version is too new (5.2.14) for this go-pear.

下载新版本

 

wget http://pear.php.net/go-pear.phar
php go-pear.phar

然后提示

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. Tests directory                               : /usr/local/php/tests
11. Name of configuration file                    : /usr/local/php/etc/pear.conf

1-11, 'all' or Enter to continue:

点击确认默认安装就ok。

然后提示:

Would you like to alter php.ini ? [Y/n] : Y

确认更新php.ini配置文件。

/usr/local/php/bin/pear channel-update pear.php.net
/usr/local/php/bin/pear install HTML_Template_Sigma

可以把/usr/local/php/bin/加入到PATH变量中。