pecl介绍(PHP模块安装利器)

PECL php的扩展库的仓库。利用相关命令可以实现自动下载php的扩展包,并自动编译和安装。类似于cpan对perl的作用一样。

有了这个好工具,那我们再不需要为了一个想要的模块,重新编译php了。
首先我们需要有pecl这个工具。通常情况下,安装php5-pea这个rpm包,就可以正常了。有些系统需要安装php5-devel。

安装完毕,我们就可以根据帮助来开始使用了。

1. pecl 查询所有的可用的module
pecl list-all

2. 安装某个module
pecl install json
安装成功后,请根据提示,将extensions=*.* 添加到php.ini配置文件里。

3.
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
channel-discover Initialize a Channel from its server
channel-info Retrieve Information on a Channel
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 format
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 channel
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
logout Logs out from the remote server
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
uninstall Un-install Package
update-channels Update the Channel List
upgrade Upgrade Package
upgrade-all Upgrade All Packages
Usage: pecl [options] command [command-options] Type "pecl help options" to list all options.
Type "pecl help shortcuts" to list all command shortcuts.
Type "pecl help " to get the help for the specified command.

此篇文章已被阅读2055 次

Add a Comment

邮箱地址不会被公开。 必填项已用*标注