mgdm / Mosquitto-PHP

A wrapper for the Eclipse Mosquitto™ MQTT client library for PHP.
BSD 3-Clause "New" or "Revised" License
528 stars 146 forks source link

cPanel installation #104

Open zstergios opened 5 years ago

zstergios commented 5 years ago

yum install mosquitto Package mosquitto-1.5.8-1.el7.x86_64 already installed and latest version

/opt/cpanel/ea-php71/root/usr/bin/pecl install -f channel://pecl.php.net/Mosquitto-0.4.0

Response `WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update

Please provide the prefix of the libmosquitto installation [autodetect] : /usr/share/cagefs-skeleton/usr/lib64/libmosquittopp.so.1 building in /root/tmp/pear/pear-build-rootcwYqYe/Mosquitto-0.4.0 running: /root/tmp/pear/Mosquitto/configure --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config --with-mosquitto=/usr/share/cagefs-skeleton/usr/lib64/libmosquittopp.so.1 ............... checking if zts is enabled... no checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking for mosquitto support... yes, shared checking for mosquitto files in default path... not found configure: error: Please reinstall the mosquitto distribution ERROR: /root/tmp/pear/Mosquitto/configure --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config --with-mosquitto=/usr/share/cagefs-skeleton/usr/lib64/libmosquittopp.so.1' failed

I'm using CENTOS 7 with CPanel

[root@server /]# find / -name "libmosquitto*"
/usr/share/cagefs-skeleton/lib64/libmosquittopp.so.1
/usr/share/cagefs-skeleton/lib64/libmosquitto.so.1
/usr/share/cagefs-skeleton/usr/lib64/libmosquittopp.so.1
/usr/share/cagefs-skeleton/usr/lib64/libmosquitto.so.1
find: ‘/usr/share/cagefs-skeleton/proc/sys/fs/binfmt_misc’: Too many levels of symbolic links
/usr/lib64/libmosquittopp.so.1
/usr/lib64/libmosquitto.so.1

None path worked for me.

ANY HELP PLEASE??!!

zstergios commented 5 years ago

Solved!

Centos - cPanel Installation Guide

yum install mosquitto-devel /opt/cpanel/ea-php71/root/usr/bin/pecl install Mosquitto-alpha

Then add extension=mosquitto.so to your php.ini. If you have cPanel/WHM go to WHM> MultiPHP INI Editor > Editor Mode

Service start and auto-startup systemctl start mosquitto systemctl enable mosquitto

zstergios commented 5 years ago

I would like to know if the service "mosquitto" is needed or not