宽屏模式

php 安装 kafka 扩展

先安装 librdkafka

git clone https://github.com/confluentinc/librdkafka.git
cd librdkafka
./configure 
make && make install

再安装 php-rdkafka

git clone https://github.com/arnaud-lb/php-rdkafka.git
cd php-rdkafka
phpize
 ./configure --with-php-config=/www/server/php/81/bin/php-config
make all -j 5
sudo make install

然后去配置 php.ini 中加入:

[kafka]
extension=/www/server/php/81/lib/php/extensions/no-debug-non-zts-20210902/rdkafka.so

php官网安装php-rdkafka

Larwas
请先登录后发表评论
  • latest comments
  • 总共0条评论