当前位置:网站首页>离线安装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
边栏推荐
- Hyperparameter Optimization - Excerpt
- 关于网络安全法的个人理解
- 记一次QT 2D 画图 实现3D动态效果
- DingTalk H5 micro-app login authentication
- PyTorch Study Notes 08 - Loading Datasets
- UR3机器人运动学分析之逆运动学分析
- Wangeditor rich text editor to upload pictures and solve cross-domain problems
- 浏览器中的画中画(Picture-in-Picture)API
- DSPE-PEG-Biotin, CAS: 385437-57-0, phospholipid-polyethylene glycol-biotin prolongs circulating half-life
- Pytorch learning notes 09 - multiple classification problem
猜你喜欢
mPEG-DMPE 甲氧基-聚乙二醇-双肉豆蔻磷脂酰乙醇胺用于形成隐形脂质体
VRchat_udon脚本介绍:傻瓜式教程教你如何实现VRchat地图的功能
Cholesterol-PEG-Thiol CLS-PEG-SH Cholesterol-Polyethylene Glycol-Sulfhydryl
【Rhapsody学习笔记】3:Dishwasher
2022 SQL big factory high-frequency practical interview questions (detailed analysis)
Websocket协议解析与QT代码示例
C语言数组的深度分析
2021-09-30
Webrtc从理论到实践一:初识
衡量 DevOps 成功与否的重要度量指标
随机推荐
力扣.三数之和/四数之和
Cholesterol-PEG-NHS NHS-PEG-CLS cholesterol-polyethylene glycol-active ester can modify small molecular materials
Phospholipids-Polyethylene Glycol-Active Esters for Scientific Research DSPE-PEG-NHS CAS: 1445723-73-8
The content of the wangeditor editor is transferred to the background server for storage
解决background-size:cover时图片铺满但显示不完整?
能否更上一层楼?探究 CMake 争论
2022 SQL big factory high-frequency practical interview questions (detailed analysis)
Learning and understanding of ROS service programming
Natural language processing related list
浅谈音视频开发入门基础及进阶资源分享
CSDN上markdown编写的一些便捷操作
Chemical Reagent Phospholipid-Polyethylene Glycol-Amino, DSPE-PEG-amine, CAS: 474922-26-4
【Rhapsody学习笔记】3:Dishwasher
DSPE-PEG-Biotin, CAS: 385437-57-0, phospholipid-polyethylene glycol-biotin prolongs circulating half-life
一种用QT实现即时通信软件表情发送与接收的思路
Cholesterol-PEG-DBCO Cholesterol-Polyethylene Glycol-Diphenylcyclooctyne Chemical Reagent
mPEG-DMPE 甲氧基-聚乙二醇-双肉豆蔻磷脂酰乙醇胺用于形成隐形脂质体
mobaxterm 编码问题解决
UE5 最新动态虚幻引擎全新版本引爆互联网
力扣.字母异位词分组