当前位置:网站首页>离线安装activeMq
离线安装activeMq
2022-07-31 05:18:00 【weixin_39945506】
公司的一个项目,需要java后台给android发送消息,之后想到了mqtt,之后在百度上搜索,决定用apache-artemis
离线包
离线包apache-artemis-2.17.0-bin.tar.gz
链接:https://pan.baidu.com/s/1a3cRP2vf-hRoglsy_drjXQ
提取码:6ucl
解压安装配置
1、 解压apache-artemis-2.17.0-bin.tar.gz
2、 进入到apache-artemis-2.17.0/bin 目录
3、 执行./artemis create mybroker 输入账号和密码如下图
4、 进入到刚创建的mybroker/bin 目录下 执行./artemis-service start启动
5、 如果无法访问:修改mybroker/etc 目录下的bootstrap.xml修改如下图中位置
6、 修改修改mybroker/etc 目录jolokia-access.xml 添加图中内容
端口
应为用到了mqtt需要放开端口8161和61616
firewall-cmd --permanent --zone=public --add-port=8161/tcp
firewall-cmd --permanent --zone=public --add-port=61616/tcp
firewall-cmd --reload
firewall-cmd --list-ports 查看所有开放的端口
测试访问
如下图代表已经部署陈宫
配置自启
在etc/init.d 目录下创建activemq,添加如下内容
#!/bin/bash
# chkconfig: 2345 10 90
# description: activemq ....
prog=artemis
JAVA_HOME=/usr/java/jdk1.8.0_271
export JAVA_HOME
CATALANA_HOME=/app/software/artemis/apache-artemis-2.17.0/bin/broker
export CATALINA_HOME
case "$1" in
start)
echo "Starting $prog..."
$CATALANA_HOME/bin/artemis-service start
;;
stop)
echo "Stopping $prog..."
$CATALANA_HOME/bin/artemis-service stop
;;
restart)
echo "Stopping $prog..."
$CATALANA_HOME/bin/artemis-service stop
sleep 2
echo
echo "Starting $prog..."
$CATALANA_HOME/bin/artemis-service start
;;
*)
echo "Usage: $prog {start|stop|restart}"
;;
esac
exit
注意:修改其中jdk和activeMQ安装目录
修改文件权限添加自启
chmod +x /etc/init.d/activemq
chkconfig --add activemq
chkconfig activemq on
边栏推荐
猜你喜欢

国际站卖家大促攻略,只需要做好这几件事

Unity转微信小游戏与JS交互

Remote file xxx is mapped to the local path xxx and can‘t be found. You can continue debugging....

DSPE-PEG-Thiol DSPE-PEG-SH phospholipid-polyethylene glycol-thiol liposome for later use

力扣151. 颠倒字符串中的单词

VRchat_udon脚本介绍:傻瓜式教程教你如何实现VRchat地图的功能

Cholesterol-PEG-Thiol CLS-PEG-SH Cholesterol-Polyethylene Glycol-Sulfhydryl

WIN10,配置adb环境

C语言结构体(必须掌握版)

911崩了,自养号测评环境IP有哪些更好的选择
随机推荐
Remote file xxx is mapped to the local path xxx and can‘t be found. You can continue debugging....
Websocket协议解析与QT代码示例
科研试剂Cholesterol-PEG-Maleimide,CLS-PEG-MAL,胆固醇-聚乙二醇-马来酰亚胺
Wlan实验(ENSP)
DSPE-PEG-COOH CAS:1403744-37-5 磷脂-聚乙二醇-羧基脂质PEG共轭物
Cholesterol-PEG-NHS NHS-PEG-CLS cholesterol-polyethylene glycol-active ester can modify small molecular materials
Cholesterol-PEG-Acid CLS-PEG-COOH 胆固醇-聚乙二醇-羧基修饰肽类化合物
UR3机器人运动学分析之正运动学分析
VRchat_udon脚本介绍:傻瓜式教程教你如何实现VRchat地图的功能
C语言结构体(必须掌握版)
DingTalk H5 micro-app login authentication
wangeditor编辑器内容传至后台服务器存储
DSPE-PEG-Biotin, CAS: 385437-57-0, phospholipid-polyethylene glycol-biotin prolongs circulating half-life
能否更上一层楼?探究 CMake 争论
IDEA overview and installation and debugging
自己设置的私密文件,在哪找
Unity版本升级问题总结
Cholesterol-PEG-NHS NHS-PEG-CLS 胆固醇-聚乙二醇-活性酯可修饰小分子材料
Unity加载GIf动画
滑动窗口法