官網地址https://www.emqx.io/docs/zh/v3.0/install.html
# 1. 安裝
修改mqtt默認訪問端口1883
```
emqx/etc/emqx.conf
listener.tcp.external = 0.0.0.0:10020
```
修改控制臺
```
emqx/etc/plugins/emqx_dashboard.conf
dashboard.listener.http = 10021
```
啟動
```
emqx/bin/emqx start/stop/restart
```
登錄控制臺
```
http://36.49.91.248:10021/
```
# 2. 配置用戶名密碼登錄
**1. 禁止匿名訪問**
```
allow_anonymous = false
acl_nomatch = deny
```
**2. 啟用認證插件**
```
./emqx_ctl plugins load emqx_auth_username
```
**3. 添加用戶**
```
./emqx_ctl users add admin 123456
```
```
./emqx_ctl users list
admin
```