EMQ(emqttd)的介绍和安装

匿名 (未验证) 提交于 2019-12-03 00:22:01


EMQ官方文档地址:http://emqtt.com/docs/v2/index.html(中文)

EMQ(消息服务器)介绍

1000万规模的路由。

MQTT、MQTT-SN、CoAP、WebSocket 或私有协议支持

二.EMQ的安装(此文档只列举在Centos7.*安装)

EMQ消息服务器每个版本都出发布Ubuntu、CentOS、FreeBSD、Mac OS X、Windows 平台程序包与 Docker 镜像;

http://emqtt.com/downloads

安装方式:

EMQ Linux RPM 程序包:

CentOS6.8

http://emqtt.com/downloads/latest/centos6-rpm

CentOS7

http://emqtt.com/downloads/latest/centos7-rpm

下载后可以直接解压启动运行

rpm -ivh emqttd-centos7-v2.1.2-1.el7.centos.x86_64.rpm

注解

Erlang/OTP R19 依赖 lksctp-tools 库

yum install lksctp-tools

: /etc/emqttd/emq.conf: /etc/emqttd/plugins/*.conf

: /var/log/emqttd

/var/lib/emqttd/

systemctl start|stop|restart emqttd.service

EMQ Linux 通用程序包:

Ubuntu12.04

http://emqtt.com/downloads/latest/ubuntu12_04

Ubuntu14.04

http://emqtt.com/downloads/latest/ubuntu14_04

Ubuntu16.04

http://emqtt.com/downloads/latest/ubuntu16_04

CentOS6.8

http://emqtt.com/downloads/latest/centos6

CentOS7

http://emqtt.com/downloads/latest/centos7

Debian7

http://emqtt.com/downloads/latest/debian7

Debian8

http://emqtt.com/downloads/latest/debian7

FreeBSD

http://emqtt.com/downloads/latest/freebsd

安装包命名由平台、版本组成,例如emqttd-macosx-v2.0.zip

:

安装包emqttd-centos7-v2.0.zip

自行创建目录如emqttd

此处下载的是zipunzip

-bash: unzip: command not found

可使用yumyum install -y unzip

yum install -y zip

unzip emqttd-centos7-v2.0.zip

:

cd emqttd

./bin/emqttd console

:

starting emqttd on node 'emqttd@127.0.0.1'

emqttd ctl is starting...[ok]

emqttd hook is starting...[ok]

emqttd router is starting...[ok]

emqttd pubsub is starting...[ok]

emqttd stats is starting...[ok]

emqttd metrics is starting...[ok]

emqttd pooler is starting...[ok]

emqttd trace is starting...[ok]

emqttd client manager is starting...[ok]

emqttd session manager is starting...[ok]

emqttd session supervisor is starting...[ok]

emqttd wsclient supervisor is starting...[ok]

emqttd broker is starting...[ok]

emqttd alarm is starting...[ok]

emqttd mod supervisor is starting...[ok]

emqttd bridge supervisor is starting...[ok]

emqttd access control is starting...[ok]

emqttd system monitor is starting...[ok]

dashboard:http listen on 0.0.0.0:18083 with 2 acceptors.

mqtt:tcp listen on 0.0.0.0:1883 with 8 acceptors.

mqtt:ssl listen on 0.0.0.0:8883 with 4 acceptors.

mqtt:ws listen on 0.0.0.0:8083 with 4 acceptors.

Erlang MQTT Broker 2.0 is running now

:

./bin/emqttd start

:

./bin/emqttd_ctl status

:

$ ./bin/emqttd_ctl status

Node 'emqttd@127.0.0.1' is started

emqttd 2.0 is running

URL

http://localhost:8080/status

:

./bin/emqttd stop

http://emqtt.com/downloads/latest/docker

:

unzip emqttd-docker-v2.0.zip

:

docker load < emqttd-docker-v2.0

:

docker run -tid --name emq20 -p 1883:1883 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 emqttd-docker-v2.0

:

docker stop emq20

:

docker start emq20

:

docker exec -it emq20 /bin/sh

4.

娉ㄨВ

http://www.erlang.org/

http://www.git-scm.com/

:

git clone https://github.com/emqtt/emq-relx.git

cd emq-relx && make

cd _rel/emqttd && ./bin/emqttd console

:

_rel/emqttd

:

cd _rel/emqttd && ./bin/emqttd console


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!