`
兰迪RANDY
  • 浏览: 97662 次
文章分类
社区版块
存档分类
最新评论

mosquitto编译安装笔记

阅读更多

wget http://mosquitto.org/files/source/mosquitto-1.3.1.tar.gz

tar zxf mosquitto-1.3.1.tar.gz

cd mosquitto-1.3.1

vim config.mk

把WITH_SRV:=yes注释掉


创建配置文件,使用默认配置

cp /etc/mosquitto/mosquitto.conf.example /etc/mosquitto/mosquitto.conf

vim /etc/mosquitto/mosquitto.conf

修改:

password_file /etc/mosquitto/pwfile

创建一个test用户:

/usr/local/mosquitto/bin/mosquitto_passwd -c /etc/mosquitto/pwfile test

输入两次密码即可

添加用户:

#/usr/local/mosquitto/bin/mosquitto_passwd -u /etc/mosquitto/pwfile test2


创建linux上的mosquitto用户(默认使用该用户启动)

useradd -s /sbin/nologin mosquitto


启动服务

/usr/local/mosquitto/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d
0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics