centos搭建activemq5.16

下载jdk、activemq(我这里都放在在/usr/local)之后。。。

/usr/local/activemq/bin/目录下有一个env文件添加JAVA_HOME

注意activemq.xml里面不能出现中文,注释也不行

接下来在/usr/lib/systemd/system/创建activemq.service文件

powershell 复制代码
# 单元节段的开始标记
[Unit]
# 服务的描述信息
Description=Description=ActiveMQ service
# 定义服务在网络目标、远程文件系统目标和域名解析服务目标完成后启动
After=network.target remote-fs.target nss-lookup.target
# 服务配置节段的开始标记
[Service]
# 定义服务类型为 forking,表示服务以分叉模式运行
Type=forking
# 定义服务启动命令
ExecStart=/usr/local/activemq/bin/activemq start
# 定义服务重新加载命令
ExecReload=/usr/local/activemq/bin/activemq restart
# 定义服务停止命令
ExecStop=/usr/local/activemq/bin/activemq stop
# 安装配置节段的开始标记
[Install]
# 指定服务将被安装到 multi-user.target 的依赖关系中,这使得该服务可以在多用户模式下启动
WantedBy=multi-user.target

重载systemctl daemon-reload

启动systemctl start activemq.service

停止systemctl stop activemq.service

重启systemctl restart activemq.service

查看状态systemctl status activemq.service

加入开机自启systemctl enable activemq.service

取消开机启动systemctl disable activemq.service

检测是否开启成功 systemctl list-unit-files | grep activemq

网络工具查看netstat -lnp|grep java,没安装的话执行yum -y install net-tools
注意:启动失败可以看/usr/local/activemq/data/里面的log日志分析

相关推荐
leoufung1 小时前
vim 多个关键字高亮插件介绍
linux·编辑器·vim
Karoku0662 小时前
【CI/CD】CI/CD环境搭建流程和持续集成环境配置
运维·ci/cd·docker·容器·kubernetes·prometheus
Nerd Nirvana4 小时前
软考—系统架构设计(案例 | 论文)
linux·系统架构·软件工程·软考·计算机基础
勤奋的凯尔森同学5 小时前
webmin配置终端显示样式,模仿UbuntuDesktop终端
linux·运维·服务器·ubuntu·webmin
希忘auto7 小时前
详解Redis在Centos上的安装
redis·centos
技术小齐9 小时前
网络运维学习笔记 016网工初级(HCIA-Datacom与CCNA-EI)PPP点对点协议和PPPoE以太网上的点对点协议(此处只讲华为)
运维·网络·学习
ITPUB-微风9 小时前
Service Mesh在爱奇艺的落地实践:架构、运维与扩展
运维·架构·service_mesh
打不了嗝 ᥬ᭄9 小时前
Linux的权限
linux
落幕9 小时前
C语言-进程
linux·运维·服务器
深度Linux9 小时前
C++程序员内功修炼——Linux C/C++编程技术汇总
linux·项目实战·c/c++