PHP uses MQTT client [based on Mosquitto]

Source: Internet
Author: User
Tags install php

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.