下载源码包
wget https://mosquitto.org/files/source/mosquitto-1.6.8.tar.gz
解压包
tar zxvf mosquitto-1.6.8.tar.gz
编译
make
安装
sudo make install
创建硬链接
sudo ln -s /usr/local/lib/libmosquitto.so.1 /usr/lib/libmosquitto.so.1
安装mqtt服务器
sudo apt-get install mosquitto
查看mqtt服务是否已经开启
sudo service mosquitto status
开启/停止 mosquitto服务:
sudo service mosquitto start sudo service mosquitto stop