php7安裝kafka擴充套件(已經測試)
版權宣告:本文為博主原創文章,未經博主允許不得轉載。 https://blog.csdn.net/zsl10/article/details/78743335 一、安裝librdkafka
# cd /usr/local/src/ # git clone https://github.com/edenhill/librdkafka.git # cd librdkafka # ./configure # make # make install # ln -s /usr/local/lib/librdkafka.so.1 /usr/lib/
1 2 3 4 5 6 7
二、安裝php-rdkafka
# cd /usr/local/src/ # git clone https://github.com/arnaud-lb/php-rdkafka.git # cd php-rdkafka # /usr/local/php/bin/phpize # ./configure --with-php-config=/usr/local/php/bin/php-config # make all -j 5 # make install
1 2 3 4 5 6 7
三、修改php.ini
# vi /etc/php.ini
##增加如下程式碼:## extension=rdkafka.so
##檢視是否安裝成功:## # /usr/local/php/bin/php -m
1 2 3 4 5 6 7
這裡寫圖片描述 四、重啟php-fpm
# service php-fpm restart --------------------- 作者:zsl10 來源:CSDN 原文:https://blog.csdn.net/zsl10/article/details/78743335 版權宣告:本文為博主原創文章,轉載請附上博文連結!