在cmd下,cd到php的安裝目錄,在命令行下輸入以下命令讀取php
c:\php> php -r "readfile('http://pear.php.net/go-pear');" > go-pear
shell
http://pear.php.net/go-pear,若是提示你的php過於新版,這輸入以下的命令,服務器
c:\php> php -r "readfile('http://pear.php.net/go-pear.pear')"ide
在輸入c:\php> php go-pear命令svn
這裏出現歡迎的頁面,按 enter鍵繼續,須提示使用HTTP代理,能夠不填ui
HTTP proxy (http://user:password@proxy.myhost.con:port), or Enter for none::.net
接下來直接按Enter,到提示是否修改php.ini文件,Y表示修改,n則表示不修改命令行
安裝完成後,安裝的程序會在php的安裝目錄下建立一個PEAR_ENV.reg註冊文件來存儲當前的環境變量,雙擊這個文件能夠將內容導入到註冊表,在命令行下運行PEAR.bar,若是出現以下則表示安裝成功代理
Commands:orm
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
channel-discover Initialize a Channel from its server
channel-info Retrieve Information on a Channel
channel-login Connects and authenticates to remote channel serv
channel-logout Logs out from the remote channel server
channel-update Update an Existing Channel
clear-cache Clear Web Services Cache
config-create Create a Default configuration file
config-get Show One Setting
config-help Show Information About Setting
config-set Change Setting
config-show Show All Settings
convert Convert a package.xml 1.0 to package.xml 2.0 form
cvsdiff Run a "cvs diff" for all files in a package
cvstag Set CVS Release Tag
download Download Package
download-all Downloads each available package from the default
info Display information about a package
install Install Package
list List Installed Packages In The Default Channel
list-all List All Packages
list-channels List Available Channels
list-files List Files In Installed Package
list-upgrades List Available Upgrades
login Connects and authenticates to remote server [Depr
n favor of channel-login]
logout Logs out from the remote server [Deprecated in fa
hannel-logout]
makerpm Builds an RPM spec file from a PEAR package
package Build Package
package-dependencies Show package dependencies
package-validate Validate Package Consistency
pickle Build PECL Package
remote-info Information About Remote Packages
remote-list List Remote Packages
run-scripts Run Post-Install Scripts bundled with a package
run-tests Run Regression Tests
search Search remote package database
shell-test Shell Script Test
sign Sign a package distribution file
svntag Set SVN Release Tag
uninstall Un-install Package
update-channels Update the Channel List
upgrade Upgrade Package
upgrade-all Upgrade All Packages [Deprecated in favor of call
ade with no parameters]
Usage: pear [options] command [command-options] <parameters>
Type "pear help options" to list all options.
Type "pear help shortcuts" to list all command shortcuts.
Type "pear help <command>" to get the help for the specified command.
經常使用的命令
查看服務器已安裝的pear包: pear list
查看某個包的詳細信息 :pear info 包名
安裝一個pear包:pear install 包名
安裝包能夠經過訪問pear官網下載相應的包,再將其解壓到相應的文件夾下便可,
注意:有些包是相互依賴的,如:auth_http就依賴與auth包,安裝時要注意,使用命令行能夠自動的安裝所依賴的包