一、从官网下载go-pear.phar 文件,地址http://pear.php.net/go-pear.phar

将下载好的文件go-pear.phar 放到PHP安装目录下,dos 命令下进入PHP安装目录 运行 php go-pear.phar,遇到提问选项,全部回车按默认选择。如果在一分钟内未按下回车键,则会提示错误然后退出。这时只要重新执行go-pear.bat即可。

如果运行成功,会如图所示:

安装完毕后,会在PHP安装目录下,生成一个pear_env.arg的注册表文件,双击该文件,将信息添加入注册表即可。

安装Mail插件:D:\mvam\php5> pear install mail

安装MDB2插件:D:\mvam\php5> pear install MDB2

安装PHPUnit插件:

D:\mvam\php5> pear config-set auto_discover 1

D:\mvam\php5>pear install pear.phpunit.de/PHPUnit

如图:

把phpunit加入环境变量,然后 phpunit --help
 
可以看到全部用法,如下:
D:\mvam\php5>phpunit --help
PHPUnit 4.0.17 by Sebastian Bergmann.

You have installed PHPUnit via PEAR. This installation method is no longer
supported and http://pear.phpunit.de/ will be shut down no later than
December, 31 2014.

Please read http://phpunit.de/manual/current/en/installation.html and
learn how to use PHPUnit from a PHAR or install it via Composer.

Usage: phpunit [options] UnitTest [UnitTest.php]
       phpunit [options] <directory>

Code Coverage Options:

--coverage-clover <file>  Generate code coverage report in Clover XML format.
  --coverage-crap4j <file>  Generate code coverage report in Crap4J XML format.
  --coverage-html <dir>     Generate code coverage report in HTML format.
  --coverage-php <file>     Export PHP_CodeCoverage object to file.
  --coverage-text=<file>    Generate code coverage report in text format.
                            Default: Standard output.
  --coverage-xml <dir>      Generate code coverage report in PHPUnit XML format.

Logging Options:

--log-junit <file>        Log test execution in JUnit XML format to file.
  --log-tap <file>          Log test execution in TAP format to file.
  --log-json <file>         Log test execution in JSON format.
  --testdox-html <file>     Write agile documentation in HTML format to file.
  --testdox-text <file>     Write agile documentation in Text format to file.

Test Selection Options:

--filter <pattern>        Filter which tests to run.
  --testsuite <pattern>     Filter which testsuite to run.
  --group ...               Only runs tests from the specified group(s).
  --exclude-group ...       Exclude tests from the specified group(s).
  --list-groups             List available test groups.
  --test-suffix ...         Only search for test in files with specified
                            suffix(es). Default: Test.php,.phpt

Test Execution Options:

--report-useless-tests    Be strict about tests that do not test anything.
  --strict-coverage         Be strict about unintentionally covered code.
  --disallow-test-output    Be strict about output during tests.
  --enforce-time-limit      Enforce time limit based on test size.
  --strict                  Run tests in strict mode (enables all of the above).

--process-isolation       Run each test in a separate PHP process.
  --no-globals-backup       Do not backup and restore $GLOBALS for each test.
  --static-backup           Backup and restore static attributes for each test.

--colors                  Use colors in output.
  --stderr                  Write to STDERR instead of STDOUT.
  --stop-on-error           Stop execution upon first error.
  --stop-on-failure         Stop execution upon first error or failure.
  --stop-on-risky           Stop execution upon first risky test.
  --stop-on-skipped         Stop execution upon first skipped test.
  --stop-on-incomplete      Stop execution upon first incomplete test.
  -v|--verbose              Output more verbose information.
  --debug                   Display debugging information during test execution.

--loader <loader>         TestSuiteLoader implementation to use.
  --repeat <times>          Runs the test(s) repeatedly.
  --tap                     Report test execution progress in TAP format.
  --testdox                 Report test execution progress in TestDox format.
  --printer <printer>       TestSuiteListener implementation to use.

Configuration Options:

--bootstrap <file>        A "bootstrap" PHP file that is run before the tests.

-c|--configuration <file> Read configuration from XML file.
  --no-configuration        Ignore default configuration file (phpunit.xml).
  --include-path <path(s)>  Prepend PHP's include_path with given path(s).
  -d key[=value]            Sets a php.ini value.

Miscellaneous Options:

-h|--help                 Prints this usage information.
  --version                 Prints the version and exits.

--self-update             Update PHPUnit to the latest version.

 
配置 PHP.ini文件

告诉PHP你的PEAR安装目录

将php.ini中的include_path修改为PEAR安装目录 include_path = ".;D:/mvam/php5/pear"

如图:

二、安装包的方法:

在PHP目录下,用命令行方式执行pear install –a Auth  就会在PHP\PEAR 目录下建立AUTH目录,目录中包含文件包。-a选项表明安装Auth包所依赖的所有其他包。

在WINDOWS下安装PEAR的更多相关文章

  1. 在windows下安装gulp —— 基于 Gulp 的前端集成解决方案(一)

    相关连接导航 在windows下安装gulp —— 基于 Gulp 的前端集成解决方案(一) 执行 $Gulp 时发生了什么 —— 基于 Gulp 的前端集成解决方案(二) 常用 Gulp 插件汇总 ...

  2. Windows 下安装 MongoDB

    Windows 下安装 MongoDB 的步骤:1.官网www.mongodb.com下载安装包或zip包2.解压下载的文件到文件夹 D:\mongo .3.使用管理员权限打开CMD,导航到目录 D: ...

  3. Coreseek Windows下安装调试

    由于项目需要全文检索,后面就去网上查了下资料,找到了Sphinx[中文是狮身人面像]这个全文检索引擎,听说挺好用的,不过没有中文分词.后面又去找了一下,找到了Coreseek,一款中文全文检索/搜索软 ...

  4. 从零开始学 Java - Windows 下安装 Tomcat

    谁都想分一杯羹 没有一个人是真正的无私到伟大的,我们试着说着做自己,与人为善,世界和平!殊不知,他们的真实目的当你知道后,你会被恶心到直摇头并下意识地迅速跑开,下辈子都不想见到他.不过,他没错,你也没 ...

  5. 从零开始学 Java - Windows 下安装 JDK

    关于未来 "我要死在火星.在我死去的时候能够想着人类能有一个美好的未来--有可持续的能源,同时能够殖民其他的星球来避免人类灭绝的最坏可能." 官网下载 直接打开官网:http:// ...

  6. windows下安装nginx

    说起开发,自己感到非常惭愧,由于公司让我给<绿电侠>项目写整体架构解决方案,才开始接触nginx这个东东,突然觉得它是一把非常好的利器. 本文主要记录在windows下安装nginx,另参 ...

  7. Redhat/Ubuntu/Windows下安装Docker

    Redhat/Ubuntu/Windows下安装Docker 什么是Docker Docker是Docker.inc公司开源的一个基于LXC技术之上构建的Container容器引擎,基于Go语言并遵从 ...

  8. Windows下安装Redis

    1.首先,Redis官方是支持Linux系统的,我这里不多说,需要的可以参考:http://www.oschina.net/question/12_18065/ 2.Windows 64位下载地址:h ...

  9. 【转】linux和windows下安装python集成开发环境及其python包

    本系列分为两篇: 1.[转]windows和linux中搭建python集成开发环境IDE 2.[转]linux和windows下安装python集成开发环境及其python包 3.windows和l ...

随机推荐

  1. Spring和EhCache整合(针对使用了Shiro)

    https://blog.csdn.net/a243293719/article/details/78277895

  2. CHUCK手把手带你搞定OPENSTACK

    一.OpenStack初探 1.1 OpenStack简介 OpenStack是一整套开源软件项目的综合,它允许企业或服务提供者建立.运行自己的云计算和存储设施.Rackspace与NASA是最初重要 ...

  3. 结合element-ui表格自动生成sku规格列表

    最近在写一个根据输入的规格,属性值动态生成sku表格,实现的效果大致如图,这是在vue项目里,结合element-UI表格写的,写好了就整理了一下,把代码贴上来,方便以后使用,不过代码里还是有一些重复 ...

  4. my.资料收集

    1.平民打书想上个高级反击,高级反击会掉哪个呢[梦幻西游手游吧]_百度贴吧.html http://tieba.baidu.com/p/5292257591?lp=5028&mo_device ...

  5. jQuery OCUpload一键上传文件

    1 引入相关的js文件 <!--引入OCUpload的js文件,之前需要引入jQuery的js文件 --> <script type="text/javascript&qu ...

  6. 05-spring整合jdbc-jdbc模板对象JdbcTemplate

    1 演示JdbcTemplate模板对象 1 导包 2 准备数据库 3 书写UserDao package www.test.dao; import java.util.List; import ww ...

  7. ArrayList代码分析

    集合算是java中最常用的部分了,阅读该部分jdk代码可以让我们更加清楚的了解其实现原理,在使用时也能心中有数,有利于写出高质量的代码. ArrayList 底层数组实现,初始长度10,超过长度后的自 ...

  8. 二叉查找树的C语言实现(一)

    什么是二叉查找树? 二叉查找树(Binary Search Tree),也称有序二叉树(ordered binary tree),排序二叉树(sorted binary tree),是指一棵空树或者具 ...

  9. HDU 4357——String change——————【规律题】

    String change Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  10. windows常用命令行总结

    cmd下的命令行 1.查看当前目录下的子目录 dir   或 dir /b 类似Linux 下的  ls 或者 ls -l 2.盘符切换  d: 3.进入目录 cd [目录名] 退一个目录 cd .. ...