Server采用apollo的MQTT服务,官方网站如下:
http://activemq.apache.org/apollo/versions/1.7.1/website/index.html
MQTT服务器下载地址,下载apache-apollo-1.7.1-unix-distro.tar.gz,安装在Ubuntu16.04系统上:
http://activemq.apache.org/apollo/versions/1.7.1/website/download.html
在安装MQTT服务器前,需要安装JDK,应该MQTT服务器是依据jdk开发的,版本不能过高,采用jdk-8u162-linux-x64.tar.gz即可,下载地址:
https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/
若不安装JDK或版本过高都会报如下错误:
startup failed: java.lang.NoClassDefFoundError:javax/xml/bind/validationeventhandler
解决方案是:https://bbs.csdn.net/topics/392278313
在下载好JDK和MQTT服务器后,先安装JDK,在按照如下blog安装、启动MQTT服务器: