PHP擴充套件安裝
阿新 • • 發佈:2021-01-16
PECL官網
http://pecl.php.net/package-stats.php
如果無法訪問pecl官網,可通過下面連結下載原始碼擴充套件包
https://github.com/wang-xuemin/pecl
amqp擴充套件依賴rabbitmq-c,需要先安裝rabbitmq-c
MacOS安裝
brew install rabbitmq-c
CentOS
yum install rabbitmq-c
Debian
apt install rabbitmq-c
FreeBSD
pkg install rabbitmq-c
rdkafka擴充套件依賴librdkafka,需要先安裝librdkafka
MacOS安裝
brew install librdkafka
CentOS
yum install librdkafka
Debian
apt install librdkafka
FreeBSD
pkg install librdkafka
PECL安裝工具,命令列安裝擴充套件
pecl install <packname>
pecl install redis
PECL原始碼安裝擴充套件
php version >= 7.0 && version <= 7.999
1、解壓擴充套件包 2、擴充套件php擴充套件模組,來生成編譯檢測指令碼 phpize 3、執行configure,編譯配置檢測 ./configure 4、執行make安裝,編譯並安裝 make && make install
生產環境不建議開啟xdebug,消耗效能
php.ini新增對應擴充套件
[yaf] yaf.environ = product yaf.library = NULL yaf.cache_config = 0 yaf.name_suffix = 1 yaf.name_separator = "" yaf.forward_limit = 5 yaf.use_namespace = 0 yaf.use_spl_autoload = 0 extension=yaf.so [swoole] extension=swoole.so [rdkafka] extension=rdkafka.so [redis] extension=redis.so [memcached] extension=memcached.so [amqp] extension=amqp.so [mongodb] extension=mongodb.so [xdebug] zend_extension=xdebug.so xdebug.var_display_max_children = 10240 xdebug.var_display_max_data = 10240 xdebug.var_display_max_depth = 10240 ;xdebug.auto_trace = on ;xdebug.collect_params = on ;xdebug.collect_return = on ;xdebug.trace_output_dir = "/Users/wangxuemin/nginx/xdebug" ;xdebug.remote_enable = on ;xdebug.profiler_enable = on ;xdebug.profiler_enable_trigger = on ;xdebug.profiler_output_name = cachegrind.out.%t.%p ;xdebug.profiler_output_dir = "/Users/wangxuemin/nginx/xdebug"