#下载解压
wget http://test.hzdlsoft.com:4459/apache-artemis-2.17.0-bin.tar.gz
cd /usr/local
tar -zxvf ~/apache-artemis-2.17.0-bin.tar.gz
#配置环境变量path
export ARTEMIS_HOME=/usr/local/apache-artemis-2.17.0
export PATH=$PATH:$ARTEMIS_HOME/bin
#在/data目录创建broker实例
cd /data
${ARTEMIS_HOME}/bin/artemis create mybroker
#修改etc/jolokia-access.xml,添加一条allow-origin的访问权限设置
<allow-origin>*://212.64.112.186*</allow-origin>
#修改etc/bootstrap.xml,localhost改为0.0.0.0
<web bind="http://0.0.0.0:8161" path="web">
#修改broker.xml中显示的name
<name>212.64.112.186</name>
#启动和停止实例
前台:
/data/mybroker/bin/artemis run
/data/mybroker/bin/artemis stop
后台
/data/mybroker/bin/artemis-service run
/data/mybroker/bin/artemis-service stop
#防火墙配置控制台端口8161,MQTT端口61616和1883
参考文档
网友评论