search
HomeBackend DevelopmentPHP7How to install kafka extension in php

This article will introduce to you how to install kafka extension in php7. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

How to install kafka extension in php

1. Install 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/

2. Install 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
三、修改php.ini
# vi /etc/php.ini
##增加如下代码:##
extension=rdkafka.so
##查看是否安装成功:##
# /usr/local/php/bin/php  -m

4. Restart php-fpm

# service php-fpm restart

Recommended learning: php video tutorial

The above is the detailed content of How to install kafka extension in php. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:CSDN. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool