centos下php安装pear模块并配置虚拟主机支持Pear模块

centos下php安装pear模块并配置虚拟主机支持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变量中。

pear install db

 

Warning: include_once(): open_basedir restriction in effect. File(/usr/share

限制虚拟主机权限? (Y/n):这里请一定要输入“n”,不限制权限,否则将会出现前面所说的“open_basedir restriction in effect”的错误!

修改虚拟主机配置文件httpd-vhosts.conf,如下

<Directory /home/wwhttpd-vhosts.conf
w/default/>^M
Options +Includes -Indexes^M
Require all granted
AllowOverride All^M
php_admin_value open_basedir /home/www/default:/usr/share/pear:/usr/local/pear/share/pear:/tmp:/proc^M
</Directory>^M
</virtualhost>^M
Include conf/vhost/*^M

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值