php透過pecl方式安裝擴展的方法:先安裝pecl,並安裝php擴展;然後查詢相關擴展,程式碼為【[root@localhost src]# pecl search swoole】;最後安裝相關擴展即可。
php透過pecl方式安裝擴充功能的方法:
##1、安裝pecl
cd /usr/local/php/bin/ wget http://pear.php.net/go-pear.phar -O go-pear.php php go-pear.php ##回车默认安装
2、安裝php擴充
pecl search key-word #用于查找扩展 pecl install key-word #用于安装扩展
#3、查詢相關擴充功能
[root@localhost src]# pecl search swoole Retrieving data...0% Matched packages, channel pecl.php.net: ======================================= Package Stable/(Latest) Local swoole 1.8.12 (stable) 1.8.12 Event-driven asynchronous and concurrent networking engine with high performance for PHP. [root@localhost src]# pecl search xdebug Retrieving data...0% Matched packages, channel pecl.php.net: ======================================= Package Stable/(Latest) Local xdebug 2.4.1 (stable) Provides functions for function traces and profiling
4、安裝相關擴展
pecl install xdebug ##安装完成之后,输出 Build process completed successfully Installing '/usr/lib64/php/modules/xdebug.so' install ok: channel://pecl.php.net/xdebug-2.4.1 configuration option "php_ini" is not set to php.ini location You should add "zend_extension=/usr/lib64/php/modules/xdebug.so" to php.ini ##根据提示,我们在php.ini的最后添加 zend_extension=/usr/lib64/php/modules/xdebug.so pecl install swoole
相關學習推薦:
以上是php如何透過pecl方式安裝擴充功能?的詳細內容。更多資訊請關注PHP中文網其他相關文章!