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

  • 测试

相关推荐
Maple_land5 小时前
Linux复习:冯·诺依曼体系下的计算机本质:存储分级与IO效率的底层逻辑
linux·运维·服务器·c++·centos
李的阿洁6 小时前
k8s中的容器服务
linux·容器·kubernetes
Macbethad6 小时前
用流程图去描述一个蓝牙BLE数字钥匙的初始化连接过程
服务器·网络·流程图
谢景行^顾7 小时前
数据结构知识掌握
linux·数据结构·算法
人工智能训练8 小时前
如何在 Ubuntu 22.04 中安装 Docker 引擎和 Linux 版 Docker Desktop 桌面软件
linux·运维·服务器·数据库·ubuntu·docker·ai编程
Maple_land9 小时前
Linux复习:系统调用与fork
linux·运维·服务器·c++·centos
无聊的小坏坏9 小时前
Poll 服务器实战教学:从 Select 迁移到更高效的多路复用
linux·服务器·poll·io多路复用
阿桂有点桂9 小时前
Docker搭建Ngnix、php5.6、php8、postgresql、redis
运维·服务器·docker·容器
WAsbry9 小时前
InputConnection机制与跨进程文本操作的工程实践
android·linux
wdfk_prog9 小时前
[Linux]学习笔记系列 -- [kernel]cpu
linux·笔记·学习