天空小小岛技术论坛

 找回密码
 注册
搜索
查看: 17754|回复: 0
打印 上一主题 下一主题

Linux 下安装 PEAR

[复制链接]
跳转到指定楼层
1#
phper 发表于 2015-10-17 22:25:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
什么是pear
pear是PHP扩展与应用库(the PHP Extension and Application Repository)的缩写。它是一个PHP扩展及应用的一个代码仓库,简单地说,pear就是PHP的cpan。
文档
http://pear.php.net/manual/zh/about-pear.php

1.下载
#curl -o go-pear.php http://pear.php.net/go-pear.phar
2.安装
#php go-pear.php
3.第一次安装时出现如下提示信息
  1. # php go-pear.php

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

  6. 1. Installation base ($prefix)                   : /root/pear
  7. 2. Temporary directory for processing            : /tmp/pear/install
  8. 3. Temporary directory for downloads             : /tmp/pear/install
  9. 4. Binaries directory                            : /root/pear/bin
  10. 5. PHP code directory ($php_dir)                 : /root/pear/share/pear
  11. 6. Documentation directory                       : /root/pear/docs
  12. 7. Data directory                                : /root/pear/data
  13. 8. User-modifiable configuration files directory : /root/pear/cfg
  14. 9. Public Web Files directory                    : /root/pear/www
  15. 10. System manual pages directory                 : /root/pear/man
  16. 11. Tests directory                               : /root/pear/tests
  17. 12. Name of configuration file                    : /root/.pearrc

  18. 1-12, 'all' or Enter to continue:
复制代码


这个时候如果觉得配置里的路径并没有出现你的  php 安装路径时,你就需要考虑你的 php.ini 禁用了一些方法导致无法读取到正确路径,可以先把禁用那个项给关了,等安装完后再打开。
关完之后,我再运行 go-pear.php 时就出现这样了
  1. 1. Installation base ($prefix)                   : /usr/local/env/php-5.4.28
  2. 2. Temporary directory for processing            : /tmp/pear/install
  3. 3. Temporary directory for downloads             : /tmp/pear/install
  4. 4. Binaries directory                            : /usr/local/env/php-5.4.28/bin
  5. 5. PHP code directory ($php_dir)                 : /usr/local/env/php-5.4.28/share/pear
  6. 6. Documentation directory                       : /usr/local/env/php-5.4.28/docs
  7. 7. Data directory                                : /usr/local/env/php-5.4.28/data
  8. 8. User-modifiable configuration files directory : /usr/local/env/php-5.4.28/cfg
  9. 9. Public Web Files directory                    : /usr/local/env/php-5.4.28/www
  10. 10. System manual pages directory                 : /usr/local/env/php-5.4.28/man
  11. 11. Tests directory                               : /usr/local/env/php-5.4.28/tests
  12. 12. Name of configuration file                    : /usr/local/env/php-5.4.28/etc/pear.conf
复制代码


然后继续回车,就安装完成了。

记得再把 disable_functions 那一项给打开即可。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|天空小小岛  |京ICP备2025130156号|

GMT+8, 2025-6-22 04:20 , Processed in 0.090873 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表