今天简单记录一下我在windows下安装pear的过程,
我的安装环境为win7、wampserver2.4、php5.4.16。
安装步骤
1. 下载 http://pear.php.net/go-pear.phar,我是把下载下来的go-pear.phar文件放到 E:/wamp/bin/pear/ ,因为我打算把pear安装到 E:/wamp/bin/pear/
2. 命令行下运行php go-pear.phar
E:/wamp/bin/pear>php go-pear.phar
Are you installing a system-wide PEAR or a local copy?
(system|local) [system] :
3. 输入system,然后回车,出现如下界面:
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 base ($prefix) : E:/wamp/bin/pear
2. Temporary directory for processing : E:/wamp/bin/pear/tmp
3. Temporary directory for downloads : E:/wamp/bin/pear/tmp
4. Binaries directory : E:/wamp/bin/pear
5. PHP code directory ($php_dir) : E:/wamp/bin/pear/pear
6. Documentation directory : E:/wamp/bin/pear/docs
7. Data directory : E:/wamp/bin/pear/data
8. User-modifiable configuration files directory : E:/wamp/bin/pear/cfg
9. Public Web Files directory : E:/wamp/bin/pear/www
10. Tests directory : E:/wamp/bin/pear/tests
11. Name of configuration file : C:/Windows/pear.ini
12. Path to CLI php.exe : E:/wamp/bin/php/php5.4.16
1-12, 'all' or Enter to continue:
4.默认安装目录结构是如上,如果想改变目录就输入前面色数字,我在这里输入的是11,因为我想将pear.ini文件和php.ini文件放在同一个目录中,输入11后让你填入pear.ini路径,我在这里填入的是 E:/wamp/bin/php/php5.4.16/pea r.ini
1-12, 'all' or Enter to continue: 11
(Use $prefix as a shortcut for 'E:/wamp/bin/pear', etc.)
Name of configuration file [C:/Windows/pear.ini] : E:/wamp/bin/php/php5.4.16/pear.ini
5. 接下来会出现类似步骤3的界面,此时直接回车就可以了。
6. 接下来是提示是否把修改php.ini,插入包含路径,输入Y,否则要手动修改。
7. 此时界面会提示 Press Enter to continue: ,直接回车就可以了。
8. 将pear添加到环境变量中,如下图
如果你想在linux下安装pear,可以访问我之前写的 linux下安装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
安装完毕之后,来检测一下
# /usr/local/php/bin/pear
Commands:
build Build an Extension From C Source
bundle Unpacks a Pecl Package
channel-add Add a Channel
channel-alias Specify an alias to a channel name
channel-delete Remove a Channel From the List
......
敢达决战官方正版 安卓版v6.7.9
下载敢达决战 安卓版v6.7.9
下载像素火影骨架佐助 (Perseverance Fire Shadow)手机版v1.16
下载要塞英雄 安卓版v33.20.0-39082670-Android
下载梦想城镇vivo最新版本 安卓版v12.0.1
梦想城镇vivo版是这款卡通风模拟经营类手游的渠道服版本,玩
怦然心动的瞬间 安卓版v1.0
怦然心动的瞬间是一款真人向的恋爱互动游戏,在游戏中玩家将扮演
曼尼汉堡店游戏 安卓版v1.0.3
曼尼汉堡店是一款非常好玩的精品恐怖类型冒险游戏,在这款游戏中
现代总统模拟器去广告版 安卓版v1.0.46
现代总统模拟器是一款休闲养成类游戏,可能对于不少的玩家来说都
现代总统模拟器付费完整版 安卓版v1.0.46
现代总统模拟器高级版在商店是需要付费的,相对于普通版本,高级