今天简单记录一下我在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
......
迷雾城堡免广告 最新版v0.1.30
迷雾城堡免广告是一款非常好玩的模拟建造类手游,玩家无需看广告
鉴车大师免广告 安卓版v1.2.2
鉴车大师免广告是一款非常好玩的模拟类手游,玩家在游戏中不用看
从前有条街 安卓最新版v1.5
从前有条街是一款非常好玩的模拟经营类手游,玩家在游戏中将会进
我的世界源之界冰火魔龙 最新版v阿夜整合
我的世界源之界冰火魔龙模组整合包是一款像素风格的沙河模拟生存
假面骑士创骑腰带模拟器 安卓版v6
假面骑士创骑腰带模拟器是一个专为喜欢假面骑士的用户打造的变身