安装环境
在安装PEAR之前需要配置安装PHP环境,如果没有自带PEAR
(直接访问http://go-pear.org并保存其首页为go-pear.php)
PEAR安装准备
如果PHP运行环境没有自带PEAR,则需要下载go-pear.php文件,同时保存在php.exe所在的目录下。
PEAR安装步骤
1、我这里用的是wamp集成环境,d:\wamp\bin\php\php5.2.5>go-pear,开始自动安装。
通过这个PEAR安装截图,可以看到首先需要确认PEAR的安装目录结构,系统通常能自动识别。
2、确认好PEAR在Windows下的安装目录结构,回车,开始下载和安装PEAR的默认扩展包,你也可以选择是否同时安装Pear_Frontend_Web-beta,Pear_Frontend_Gtk2,MDB2扩展包。
3、PEAR默认扩展包安装后,提示是否需要配置php.ini文件中的include_path选项指向pear的安装目录,当然需要配置,否则无法使用,Y并回车,安装包会自动修改include_path选项。
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, channel:/
/pear.symfony-project.com/YAML, use --alldeps to download automatically
phpunit/PHPUnit requires PEAR Installer (version >= 1.8.1), installed version is
1.6.1
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2
.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use package "channel://pear.symfony-project.com/Y
AML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "pdo_sqlite"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
No valid packages found
install failed
(安装phpunit失败,此时通过pear upgrade pear更新pear后继续安装)
d:\wamp\bin\php\php5.2.5>pear upgrade pear
downloading PEAR-1.9.0.tgz ...
Starting to download PEAR-1.9.0.tgz (291,634 bytes)
......
d:\wamp\bin\php\php5.2.5>pear info pear
ABOUT PEAR.PHP.NET/PEAR-1.9.0
......
d:\wamp\bin\php\php5.2.5>pear channel-discover pear.phpunit.de
Channel "pear.phpunit.de" is already initialized
d:\wamp\bin\php\php5.2.5>pear install phpunit/PHPUnit
Unknown remote channel: pear.symfony-project.com
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, channel:/
/pear.symfony-project.com/YAML, use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2
.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use package "channel://pear.symfony-project.com/Y
AML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "pdo_sqlite"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
downloading PHPUnit-3.4.13.tgz ...
Starting to download PHPUnit-3.4.13.tgz (254,903 bytes)
.....................................................done: 254,903 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.4.13
phpunit安装完毕,可输入phpunit测试
在安装PEAR之前需要配置安装PHP环境,如果没有自带PEAR
(直接访问http://go-pear.org并保存其首页为go-pear.php)
PEAR安装准备
如果PHP运行环境没有自带PEAR,则需要下载go-pear.php文件,同时保存在php.exe所在的目录下。
PEAR安装步骤
1、我这里用的是wamp集成环境,d:\wamp\bin\php\php5.2.5>go-pear,开始自动安装。
通过这个PEAR安装截图,可以看到首先需要确认PEAR的安装目录结构,系统通常能自动识别。
2、确认好PEAR在Windows下的安装目录结构,回车,开始下载和安装PEAR的默认扩展包,你也可以选择是否同时安装Pear_Frontend_Web-beta,Pear_Frontend_Gtk2,MDB2扩展包。
3、PEAR默认扩展包安装后,提示是否需要配置php.ini文件中的include_path选项指向pear的安装目录,当然需要配置,否则无法使用,Y并回车,安装包会自动修改include_path选项。
PEAR安装完成,双击PEAR_ENV.reg将相关信息导入注册表,同时重启Apache即可。
PEAR的其他安装方法
如果PHP运行环境自带PEAR,则可以在PHP目录下找到PEAR.DAT文件,双击这个文件即可进行PEAR安装,方式应该类似上述安装方式。同时注意修改PHP.INI中的include_path选项即可。
PEAR命令
在命令行方式下,运用PEAR的相关命令可以安装自己需要的PEAR安装包。
pear help 列出pear的所有命令,类似于pear的命令帮助命令。
pear help <command> 列出某个pear命令的具体信息
pear help shortcuts 列出所有pear命令的简写
pear list-all 列出所有可安装的packages,很多,可以访问pear扩展包列表找到需要的packages,再使用pear install命令安装package。
(安装pear时,可以让其使用默认值,一直回车完。)
接着安装单元测试框架phpunit:
d:\wamp\bin\php\php5.2.5>pear channel-discover pear.phpunit.de
Adding Channel "pear.phpunit.de" succeeded
Discovery of channel "pear.phpunit.de" succeeded
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, channel:/
/pear.symfony-project.com/YAML, use --alldeps to download automatically
phpunit/PHPUnit requires PEAR Installer (version >= 1.8.1), installed version is
1.6.1
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2
.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use package "channel://pear.symfony-project.com/Y
AML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "pdo_sqlite"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
No valid packages found
install failed
(安装phpunit失败,此时通过pear upgrade pear更新pear后继续安装)
d:\wamp\bin\php\php5.2.5>pear upgrade pear
downloading PEAR-1.9.0.tgz ...
Starting to download PEAR-1.9.0.tgz (291,634 bytes)
......
d:\wamp\bin\php\php5.2.5>pear info pear
ABOUT PEAR.PHP.NET/PEAR-1.9.0
......
d:\wamp\bin\php\php5.2.5>pear channel-discover pear.phpunit.de
Channel "pear.phpunit.de" is already initialized
d:\wamp\bin\php\php5.2.5>pear install phpunit/PHPUnit
Unknown remote channel: pear.symfony-project.com
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, channel:/
/pear.symfony-project.com/YAML, use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2
.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use package "channel://pear.symfony-project.com/Y
AML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "pdo_sqlite"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
downloading PHPUnit-3.4.13.tgz ...
Starting to download PHPUnit-3.4.13.tgz (254,903 bytes)
.....................................................done: 254,903 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.4.13
phpunit安装完毕,可输入phpunit测试
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
更新日志
2024年11月22日
2024年11月22日
- 莫扎特弗雷德沃夏克肖斯塔科维奇《钢琴五重奏》(DG24-96)FLAC
- 证声音乐图书馆《夏至 爵士境地》[FLAC/分轨][360.16MB]
- 证声音乐图书馆《日落琴声 x 弦乐》[320K/MP3][71.2MB]
- 证声音乐图书馆《日落琴声 x 弦乐》[FLAC/分轨][342.58MB]
- 谢采妘2011《难忘的旋律(Non-StopChaCha)》马来西亚版[WAV+CUE]
- 林翠萍《听见林翠萍,记忆就会醒来》2CD[WAV+CUE]
- 木村好夫《天龍HIFI木吉他、木村好夫精选好歌》日本天龙版[WAV整轨]
- 证声音乐图书馆《日出琴声 x 民谣》[320K/MP3][53.76MB]
- 证声音乐图书馆《日出琴声 x 民谣》[FLAC/分轨][239.29MB]
- 证声音乐图书馆《绿意森林·吉他絮语》[320K/MP3][65.77MB]
- 证声音乐图书馆《绿意森林·吉他絮语》[FLAC/分轨][295.2MB]
- 证声音乐图书馆《流动与延展 彼拉提斯》[320K/MP3][56.88MB]
- 证声音乐图书馆《流动与延展 彼拉提斯》[FLAC/分轨][238.33MB]
- 张智霖2014《DEJAVU似曾相识(港版)》[WAV整轨]
- 邓丽君《Singles》2CD(金牛宫版)[正版原抓WAV+CUE]