Build an MQTT server on windows10

1. Download and install

1. Appollo download address

http://archive.apache.org/dist/activemq/activemq-apollo/1.7.1/

2. Install and configure the JDK of the PC, and configure the environment variables. I am JDK1.8.

3. Create a server instance mybroker (note the path)

4. Configure the MQTT server (IP, port, administrator password, etc.)

It is recommended to modify the MQTT server IP. I did not modify it during the first operation, and kept the default IP: 127.0.0.1. However, during the subsequent operation, my lower computer (hardware) cannot connect to the MQTT server.

So the second time, I changed the IP address to the IP under the local area network of the machine, as shown in the figure below:

5. Mybroker runs (only the screenshot when the IP is not modified for the first time, the effect is the same, just see)

Note: Pay attention to the printed TCP port number, for example, the TCP port number in the above picture is 61613

6. Enter the server management interface

On the browser, enter http://127.0.0.1:61680/ or https://127.0.0.1:61681/ (any port can open the login page)

2. MQTT client test

Available methods:

1. Coding: write client-side code

2. Software: MQTT client tool (MQTTBox or others)

I use MQTTBox to verify whether the client can successfully connect to the server:

Guess you like

Origin blog.csdn.net/qq_40384309/article/details/106870359