In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Download address of the installation package:
Http://emqtt.com/downloads
Here we download emqttd-centos6.8-v2.1.2.zip
Configure two host hosts
192.168.0.10 s1.emqtt.io192.168.0.20 s2.emqtt.io
Installation configuration (s1.emqtt.io):
Install dependency package # yum install-y lksctp-tools install # unzip emqttd-centos6.8-v2.1.2.zip # cd emqttd#vi etc/emq.confnode.name = emqttd@s1.emqtt.io or node.name = emqttd@192.168.0.10
In the same way, configure s2.emqtt.io to start two nodes respectively
Start # bin/emqttd startemqttd 2.1.2 is started fully fulfilled EMQ message server process status query: #. / bin/emqttd_ctl statusNode 'emqttd@s1.emqtt.io' is startedemqttd 2.1.2 is running
Join the cluster
Execute on emqttd@s2.emqtt.io:
# bin/emqttd_ctl cluster join emqttd@s1.emqtt.ioJoin the cluster successfully.Cluster status: [{running_nodes, ['emqttd@s1.emqtt.io','emqttd@s2.emqqt.io']}]
Or execute on emqttd@s1.emqtt.io:
# bin/emqttd_ctl cluster join emqttd@s2.emqtt.ioJoin the cluster successfully.Cluster status: [{running_nodes, ['emqttd@s1.emqtt.io','emqttd@s2.emqtt.io']}]
Query the cluster status on any node:
# bin/emqttd_ctl cluster statusCluster status: [{running_nodes, ['emqttd@s1.emqtt.io','emqttd@s2.emqtt.io']}] node exits the cluster
Nodes exit the cluster in two ways:
Leave: this node exits the cluster
Remove: remove other nodes from the cluster
Emqttd@s2.emqtt.io actively exits the cluster:
# bin/emqttd_ctl cluster leaveLeave the cluster successfully.Cluster status: [{running_nodes, ['emqttd@s2.emqqt.io']}]
Or emqttd@s1.emqtt.io node, delete the emqttd@s2.emqtt.io node from the cluster:
# bin/emqttd_ctl cluster remove emqttd@s2.emqtt.io Firewall Settings
If there is a firewall between the cluster nodes, the firewall needs to open port 4369 and a TCP port segment. 4369 is used by the epmd port mapping service, and the TCP port segment is used to establish connections and communications between nodes.
After the firewall is set, EMQ needs to configure the same port segment, emqttd/etc/emq.conf file:
# # Distributed node port rangenode.dist_listen_min = 6000node.dist_listen_max = 6999 Note: NetSplit
The EMQ message server cluster needs a stable network connection to avoid NetSplit failures. NetSplit is not automatically processed by default in cluster design. If NetSplit occurs between cluster nodes, you need to restart the relevant nodes on a shard manually.
EMQTTD cluster verification
Cluster verification We use Mosquitto to verify "centos yum install Mosquitto"
10 message, 20 subscription 10 write message # mosquitto_pub-t topicTest07-m Message05-h 192.168.0.10-p 188320 subscription View # mosquitto_sub-v-t topicTest07-h 192.168.0.20-p 1883topicTest07 Message05 20 message, 10 subscription 20 write message # mosquitto_pub-t topicTest08-m Message06-h 192.168.0.20-p 188310 subscription View # mosquitto_sub-v-t topicTest08-h 192.168.0.10-p 1883topicTest08 Message06
EMQTTD condition monitoring
Condition monitoring can be carried out through self-contained WEB
Http://192.168.0.10:8083/status
And through the console:
Http://192.168.0.10:18083
Default account and password: admin/public
The console is full of information. Find out for yourself.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.