I. Installation of Mosquitto
Download installation Dependent
Yum install gcc gcc-c++ openssl-devel c-ares-devel libuuid-devel wget cmake build-essential python quilt devscripts python -setuptools python3 libssl-dev libc-ares-dev uuid-dev Daemon
Download file (website download https://mosquitto.org/files/source/, here i download the time 1.4.11)
wget https://mosquitto.org/files/source/mosquitto-1.4.11.tar.gz
Unzip, compile and install after entering directory
TAR-ZXVF mosquitto-1.4.11.tar.gz
cd mosquitto-1.4.11 make
&& make install
Installation Complete
Second, install PHP extension
PECL download installation (in the middle of a prompt to ask you mosquitto the path and so on, without the tube, direct return, it will check the default directory)
PECL Install Mosquitto-alpha
Find php.ini Add the following sentence (there is a place in the file, a bunch of extension= ..., at the end of that pile of extension, for the next search)
Extension=mosquitto.so