Ubuntu上mosquitto下载编译

  • 下载源码

Download | Eclipse Mosquitto

  • 准备
sudo apt install gcc g++ make
  • 最简编译
make \
    WITH_TLS=no \
    WITH_CJSON=no

# sudo make install WITH_TLS=no WITH_CJSON=no
  • 默认编译

默认编译需要ssl和cjson。也可以根据需要增加其他可选。 

Ubuntu上cJSON下载编译-CSDN博客

LINUX下载编译OpenSSL_openssl-1.0.2u编译-CSDN博客  

make

sudo make install
  • 测试
$ mosquitto
1702887215: mosquitto version 2.0.18 starting
1702887215: Using default config.
1702887215: Starting in local only mode. Connections will only be possible from clients running on this machine.
1702887215: Create a configuration file which defines a listener to allow remote access.
1702887215: For more details see https://mosquitto.org/documentation/authentication-methods/
1702887215: Opening ipv4 listen socket on port 1883.
1702887215: Opening ipv6 listen socket on port 1883.
1702887215: mosquitto version 2.0.18 running

你可能感兴趣的:(linux,ubuntu,mosquitto)