linux pecl 安装

2015-2-5 杜世伟 Php

PECL 是通过 » PEAR 打包系统来的 PHP 扩展库仓库,本章内容示范了怎样取得并安装 PECL 扩展。

接下来我们在服务上安装pecl命令:
首先查看php所在的目录:
#which php
# /usr/bin/php

# cd /usr/bin/php

#download

# curl -o go-pear.php http://pear.php.net/go-pear  
# curl -o go-pear.php http://pear.php.net/go-pear.phar # 如果你的php版本高于php5.3, 执行这条  

#install:
php go-pear.php # 回车, 会提示选择安装的东西, 直接回车, 安装全部, 若后面有要选择y/n的, 输入y回车  

如果看到下面的一段话就是安装成功:
Run it without parameters to see the available actions, try 'pear list'  
to see what packages are installed, or 'pear help' for help.  
  
For more information about PEAR, see:  
  
  http://pear.php.net/faq.php  
  http://pear.php.net/manual/  
  
Thanks for using go-pear!  

现在就可以使用PHP的扩展库pecl 安装一些PHP 常用扩展了

#查看pecl命令
#pecl help
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-login          Connects and authenticates to remote channel server
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 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 [Deprecated in favor of channel-login]
logout                 Logs out from the remote server [Deprecated in favor of channel-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 calling upgrade with no parameters]
Usage: pecl [options] command [command-options] <parameters>
Type "pecl help options" to list all options.
Type "pecl help shortcuts" to list all command shortcuts.
Type "pecl help version" or "pecl version" to list version information.
Type "pecl help <command>" to get the help for the specified command.

参考:
http://php.net/manual/zh/install.pecl.intro.php

标签: PHP linux pecl

Powered by emlog 沪ICP备2023034538号-1