Linux搭建MQTT服务器(mosquitto)并使用

  • 下载源码

Index of /files/source/ (mosquitto.org)

  • 解包

    $ tar xf mosquitto-2.0.9.tar.gz

  • 编译准备

    sudo apt install -y gcc g++ cmake openssl libssl-dev

  • 编译及安装

    cd mosquitto-2.0.9 make
    $ sudo make install

  • 配置文件(修改端口)

    cd /etc/mosquitto/ sudo cp mosquitto.conf.example mosquitto.conf

mosquitto 2.0修改端口-CSDN博客

  • 启动

    $ /usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d

  • 测试

相关推荐
jason.zeng@150220717 分钟前
centos中安装redis
linux·redis·centos
w23617346011 小时前
Linux 服务器安全巡检与加固:从命令到实操(CentOS/Ubuntu 通用)
linux·服务器·安全·安全加固·安全巡检
TG_yunshuguoji1 小时前
阿里云云代理商:阿里云CDN刷新机制是什么?
服务器·阿里云·云计算
xiaogg36781 小时前
阿里云k8s1.33部署yaml和dockerfile配置文件
java·linux·kubernetes
python百炼成钢1 小时前
3.Linux 网络相关
linux·运维·网络·stm32·单片机
Jtti1 小时前
香港硬防服务器防御DDOS攻击的优点
运维·服务器·ddos
lpfasd1234 小时前
第2部分:Netty核心架构与原理解析
运维·服务器·架构
若尘拂风4 小时前
centos 7.9 编译安装 freeswitch 1.10.12
服务器·udp·freeswitch·sip
小蜜蜂爱编程4 小时前
gerrit的部署与配置关联到不同服务器上的git仓库
运维·服务器·git·gerrit