- 下载源码
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
-
启动
$ /usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d
-
测试