just do it

mosquitto 安装php客户端扩展

1.php扩展源文件下载:
http://pecl.php.net/package/Mosquitto

https://github.com/mgdm/Mosquitto-PHP

本次选择Mosquitto-0.4.0.tgz 版本安装。

2.编译安装php扩展

1
2
3
4
phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-mosquitto=/usr/local/lib/libmosquitto 
make
make install

3.编辑php.ini 增加扩展
[mosquitto]
extension = mosquitto.so

4.phpiinfo查看

点赞