- 安装目录
mkdir /opt/emqx && cd /opt/emqx
- 安装包下载
yum -y install wget && wget https://www.emqx.com/zh/downloads/broker/5.0.20/emqx-5.0.20-el7-amd64.tar.gz
注意:https://www.emqx.com/zh/downloads/broker获取下载链接并替换(后缀:el7-amd64.tar.gz)
- 安装包解压
tar -zxvf emqx-5.0.20-el7-amd64.tar.gz && rm -rf emqx-5.0.20-el7-amd64.tar.gz
- 环境变量
echo "export EMQX_HOME=/opt/emqx" >> /etc/profile
echo "export PATH=\$PATH:\$EMQX_HOME/bin" >> /etc/profile
source /etc/profile
- 端口权限
firewall-cmd --zone=public --add-port=1883/tcp --permanent && firewall-cmd --reload
firewall-cmd --zone=public --add-port=8083/tcp --permanent && firewall-cmd --reload
firewall-cmd --zone=public --add-port=8084/tcp --permanent && firewall-cmd --reload
firewall-cmd --zone=public --add-port=8883/tcp --permanent && firewall-cmd --reload
firewall-cmd --zone=public --add-port=18083/tcp --permanent && firewall-cmd --reload
- EMQX命令
服务启动/关闭:emqx start/stop
EMQX控制台:http://192.168.1.97:18083 (admin/public)
EMQX在线客户端:http://www.emqx.io/online-mqtt-client
ws://emqx@192.168.1.97:8083/mqtt (admin/public)
EMQX桌面客户端:https://mqttx.app/zh
ws://emqx@192.168.1.97:8083/mqtt (admin/public)
mqtt://192.168.1.97:1883 (admin/public)
EMQX在线服务器:https://www.emqx.com/zh/mqtt/public-mqtt5-broker
ws://emqx@broker-cn.emqx.io:8083/mqtt (admin/public)
mqtt://broker-cn.emqx.io:1883 (admin/public)
EMQX官网:https://www.emqx.io/zh
EMQX文档:https://www.emqx.io/docs/zh/v5.0/