Study of MQTT (16) Mosquitto Windows installation deployment for MQTT

Source: Internet
Author: User
Tags mqtt broker

On the official website of MQTT, there are many mqtt, including: Mosquittoan Open Source mqtt server with C, C + +, Python and Javascript clients. A public, hosted test server was also available (more information)

Moquettea Java MQTT broker based on a eventing model with Apache Mina.


Official website of the Mosquitto
http://mosquitto.org/

Mosquitto's official offer to test the MQTT channel
Http://mqtt.org/wiki/doku.php/public_brokers

See the documentation for the various commands:

    • Mosquitto (8), Haven Broker
    • Mosquitto.conf (5) –broker configuration
    • MOSQUITTO_PASSWD (1) –tool for managing Mosquitto password files
    • MOSQUITTO_TLS (7) –very rough cheat sheet for helping with SSL/TLS
    • Mosquitto_pub (1) –command line Client for publishing
    • Mosquitto_sub (1) –command line Client for subscribing
    • MQTT (7) –background on the principles of MQTT
    • Libmosquitto (3) –client Library programming

Various function Description Sites

Http://mosquitto.org/api/files/mosquitto-h.html

Installing in the Window System

Windows
    • Mosquitto-1.0.3-install-win32.exe (743 KB) (Native build, Windows Vista and up)
    • Mosquitto-1.0.3-install-cygwin.exe (2,026 KB) (Cygwin build, Windows XP and up)

Corresponding software installed on different operating systems (Window,liunx,suse,centeros,redhat,fedora,opensuse, etc.):

Download page

http://mosquitto.org/download/

My system is win7 type, using Mosquitto-1.0.3-install-cygwin.exe, so need to install cygwind software. Mosquitto-dependent Lib has

    • Binutils
    • Gcc4-core
    • gcc4-gcc
    • Libwrap-devel
    • Libwrap0
    • Make
    • Mercurial
    • Wget

So when installing Cygwin, choose to install the software.

We can download the Cygwin installer on the official website of Cygwin, the address is:

http://www.cygwin.com/

or download the installer directly by using the download connection:

Http://www.cygwin.com/setup.exe

After the download is complete, run the Setup.exe program and the installation screen appears. Directly point to "next", the Installation Mode dialog box appears as shown in:

We see three types of installation modes:

    • Install from the Internet, this mode is installed directly from the Internet, suitable for fast speed situation;
    • Download without installing, this mode only downloads the Cygwin component package from the Internet, but does not install;
    • Install from local Directory, this mode corresponds to the second mode above, and when your Cygwin component package has been downloaded locally, you can use this mode to install Cygwin locally.

Choose from the above three modes suitable for your installation mode, here we choose the first installation mode, directly from the Internet installation, of course, while downloading, Cygwin components are also saved to the local, so that later can be installed again. When selected, click Next,

This step selects the installation directory for the Cygwin, as well as some parameter settings. The default installation location is C:\cygwin\, you can also choose your own installation directory, and then choose "Next",

This step we can select the installation process from the Internet Download Cygwin component package save location, after selecting, click "Next",

This step select the way to connect, select your connection mode, and then click Next, the Select Download Site dialog box appears, as shown in,

In this step, we need to note that in order to get the fastest download speed, we first look for the address of the Cygwin Chinese image in the list: http://www.cygwin.cn, if found, select this address; If you cannot find this address, enter the address of the Chinese mirror manually: http ://www.cygwin.cn/pub/, then click "Add" and then select it in the list. After selecting Done, click "Next",

This step, we choose to download the installed component package, in order to enable our installed Cygwin to compile the program, we need to install the GCC compiler, by default, GCC will not be installed, we need to select it to install. In order to install GCC, we use the mouse to click on the "Devel" branch in the component list, where there are many components, we must:

Binutils
Gcc
Gcc-mingw
Gdb

Mouse click on the front of the component of the loop button, the build date will appear, we choose the latest version of the installation, is selected after the four categories of components:


Binutils components

GCC components

GCC-MINGW components

GDB components

After the selection, we choose the next step, enter the installation process, as shown in,

The time of installation depends on the components you select and the network conditions. After the installation is complete, the installer will prompt you to create the Cygwin icon on the desktop and click Finish to exit Setup.

Installing Mosquitto-cygwin Software

If you run only Mosquitto.exe, without parameters, the configuration file cannot be loaded, that is, the content that is running is the default setting.

If you need to use the parameters in the configuration file, you need to run the parameters under DOS, for example

The first way:

To start the Mosquitto service in Control Panel

The second type: Running the deployment in DOS

Mosquitto-c-C mosquitto.conf

However, when running Mosquitto_pub and mosquitto_sub, the report "Cannot start this program because of a missing MSVCR100.dll". Check the online data said Mosquitto_pub and Mosquitto_sub is the VS 2008 compiled, the computer if the DLL is missing, can not run.


Mosquitto There are three configuration files:
Configuration file for Mosquitto.conf:mosquitto
Aclfile.example:
Pwfile.example:

Study of MQTT (16) Mosquitto Windows installation deployment for MQTT

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.