关于activemq:activemq入门安装

1、资源筹备1.1 环境Centos7、jdk8、activemq5.15.81.2 activemq5.15.8 安装包官网下载地址:http://activemq.apache.org/ac... 国外下载比较慢,能够通过这个网址下载:https://download.csdn.net/dow... 2、装置步骤2.1 上传下载好的activemq安装包到/var目录并解压tar -zxvf apache-activemq-5.15.8-bin.tar.gz -C /var 2.2 批改目录名称mv /var/apache-activemq-5.15.8/ /var/activemq/2.3 做成零碎服务2.3.1 创立一个systemd服务文件vi /usr/lib/systemd/system/activemq.service2.3.2 在该文件放入以下内容[Unit]Description=ActiveMQ serviceAfter=network.target[Service]Type=forkingExecStart=/var/activemq/bin/activemq startExecStop=/var/activemq/bin/activemq stopUser=rootGroup=rootRestart=alwaysRestartSec=9StandardOutput=syslogStandardError=syslogSyslogIdentifier=activemq[Install]WantedBy=multi-user.target2.3.3 找到java命令所在的目录whereis java2.3.4 设置activemq配置文件/var/activemq/bin/env中的JAVA_HOME# Location of the java installation# Specify the location of your java installation using JAVA_HOME, or specify the# path to the "java" binary using JAVACMD# (set JAVACMD to "auto" for automatic detection)JAVA_HOME="/usr/local/java/jdk1.8.0_181"JAVACMD="auto"2.3.5 通过systemctl治理activemq启停#启动activemq服务: systemctl start activemq#查看服务状态: systemctl status activemq#创立软件链接:ln -s /usr/lib/systemd/system/activemq.service /etc/systemd/system/multi-user.target.wants/activemq.service#开机自启: systemctl enable activemq#检测是否开启胜利(enable): systemctl list-unit-files |grep activemq2.3.6 防火墙配置,Web治理端口默认为8161,通信端口默认为61616增加并重启防火墙 ...

February 23, 2022 · 1 min · jiezi