今天简单记录一下我在windows下安装pear的过程,
我的安装环境为win7、wampserver2.4、php5.4.16。
安装步骤
1. 下载 http://pear.p***hp.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.*p**hp.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
......
疯狂医院达什医生中文版(Crazy Hospital)
疯狂医院达什医生最新版是一款医院模拟经营类游戏,逼真的场景画
宝宝庄园官方版
宝宝庄园官方版是一款超级经典好玩的模拟经营类型的手游,这个游
桃源记官方正版
桃源记是一款休闲娱乐类的水墨手绘风格打造的模拟经营手游。玩家
长途巴士模拟器手机版
长途巴士模拟器汉化版是一款十分比真好玩的大巴车模拟驾驶运营类
房东模拟器最新版2024
房东模拟器中文版是一个超级有趣的模拟经营类型的手游,这个游戏