CentOS 安装PHP-PEAR

 

官方提供了两种方式安装pear:
1. 编译php的时候加入pear配置模块。
2. go-pear方式。

我尝试了go-pear方式。
下载go-pear脚本

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

重命名:

mv go-pear go-pear.php

执行脚本:

php go-pear.php
Welcome to go-pear!

Go-pear will install the 'pear' command and all the files needed by
it.  This command is your tool for PEAR installation and maintenance.

Go-pear also lets you download and install the following optional PEAR
packages: PEAR_Frontend_Web-beta, PEAR_Frontend_Gtk2, MDB2.

If you wish to abort, press Control-C now, or press Enter to continue:

回车确认。

HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none::

回车不需要代理。

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation prefix ($prefix) : /usr/local/ara
 2. Temporary files directory     : $prefix/temp
 3. Binaries directory            : $prefix/bin
 4. PHP code directory ($php_dir) : $prefix/PEAR
 5. Documentation base directory  : $php_dir/docs
 6. Data base directory           : $php_dir/data
 7. Tests base directory          : $php_dir/tests

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

安装配置,选择一项修改默认值,直接回车不修改。我要改安装目录,选了1,回车。

Installation prefix ($prefix) [/usr/local/ara] :

输入目录:

/usr/loacl/pear

然后开始安装了,最后会让提示你需要修改php.ini文件,确认即可。
安装完毕,有提示:

The 'pear' command is now at your service at /usr/local/pear/bin/pear

** The 'pear' command is not currently in your PATH, so you need to
** use '/usr/local/pear/bin/pear' until you have added
** '/usr/local/pear/bin' to your PATH environment variable.

你可以把/usr/local/pear/bin/pear加入PATH环境变量,或者直接使用/usr/local/pear/bin/pear运行pear命令。

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

这两个命令执行ok。

 

 

转载自:http://www.lazylei.com/?p=535

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值