****** 所在服务器
189
****** 安装
※ Erlang 安装 安装编译依赖: yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget 下载erlang: wget http://www.erlang.org/download/otp_src_19.3.tar.gz 解压安装: tar -xzvf otp_src_19.3.tar.gz cd otp_src_19.3 ./configure --prefix=/usr/local/erlang make && make install 配置环境变量 vi /etc/profile 添加: ERL_PATH=/usr/local/erlang/bin PATH=$ERL_PATH:$PATH source /etc/profile 检查是否安装成功: erl
※ Rebar 安装 下载: git clone git://github.com/rebar/rebar.git 安装: cd rebar ./bootstrap 配置环境变量 vi /etc/profile 添加: export PATH=/emq/rebar/:$PATH (rebar安装目录) source /etc/profile 检查是否安装成功: rebar -V
※ EMQX 安装 下载: git clone https://github.com/emqtt/emq-relx.git 桥接: Makefile DEPS += emqx_kafka_bridge dep_emqx_kafka_bridge = git https://gitee.com/laidawoya/emqx-kafka-bridge.git master relx.config {emqx_kafka_bridge, load} 构建: make 配置: _rel/emqx/etc/emqx.conf #关闭匿名认证 mqtt.allow_anonymous = false #Erlang Process Limit node.process_limit = 2097152 #Sets the maximum number ofsimultaneously existing ports for this system node.max_ports = 1048576
※ EMQX 桥接 KAFKA 集群 KAFKA单机桥接配置 /home/emq/emqx-rel/_rel/emqx/etc/plugins https://gitee.com/laidawoya/emqx-kafka-bridge
KAFKA集群桥接
https://gitee.com/laidawoya/emqx-kafka-bridge
注意这个配置:emqx.kafka.bridge.regex,,对应emqx_kafka_bridge.erl 117行的 [Type, ProductId, DevKey|Fix]
※ 可视化界面访问地址: http://192.168.0.189:18083 admin/public
****** 启动 / 关闭 / 重启
189 /home/emq/emqx-cluster/emqx-baal/emqx/bin/emqx start /home/emq/emqx-cluster/emqx-baal/emqx/bin/emqx stop
****** 开机启动
来源:oschina
链接:https://my.oschina.net/liudandan/blog/4298003