安裝pecl
cd /usr/local/php/bin/wget http://pear.php.net/go-pear.phar -O go-pear.phpphp go-pear.php##回車默認(rèn)安裝
安裝php擴(kuò)展
pecl search key-word #用于查找擴(kuò)展pecl install key-word #用于安裝擴(kuò)展
查詢相關(guān)擴(kuò)展
[root@localhost src]# pecl search swooleRetrieving data...0%Matched packages, channel pecl.php.net:=======================================Package Stable/(Latest) Localswoole 1.8.12 (stable) 1.8.12 Event-driven asynchronous and concurrent networking engine with high performance for PHP.[root@localhost src]# pecl search xdebugRetrieving data...0%Matched packages, channel pecl.php.net:=======================================Package Stable/(Latest) Localxdebug 2.4.1 (stable) Provides functions for function traces and profiling
安裝相關(guān)擴(kuò)展
pecl install xdebug##安裝完成之后,輸出Build process completed successfullyInstalling '/usr/lib64/php/modules/xdebug.so'install ok: channel://pecl.php.net/xdebug-2.4.1configuration option "php_ini" is not set to php.ini locationYou should add "zend_extension=/usr/lib64/php/modules/xdebug.so" to php.ini##根據(jù)提示确封,我們在php.ini的最后添加zend_extension=/usr/lib64/php/modules/xdebug.sopecl install swoole
設(shè)置全局php.ini,設(shè)置后可以自動添加.
/opt/remi/php73/root/usr/bin/pear config-set php_ini /etc/opt/remi/php73/php.ini
/opt/remi/php73/root/usr/bin/pecl install redis