activemq 的安装部署
下载
https://activemq.apache.org/components/classic/download/# 在/opt目录下载
wget https://dlcdn.apache.org//activemq/5.18.6/apache-activemq-5.18.6-bin.tar.gz
解压
tar -zxvf apache-activemq-5.18.6-bin.tar.gz
配置java环境
vim /opt/apache-activemq-5.18.6/bin/env
增加
JAVA_HOME="/opt/openjdk-11.0.20_8"
启动
/opt/apache-activemq-5.18.6/bin/activemq start /opt/apache-activemq-5.18.6/bin/activemq status/opt/apache-activemq-5.18.6/bin/activemq stop
配置修改
启动的web端口
vim /opt/apache-activemq-5.18.6/conf/jetty.xml
<bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start"><!-- the default port number for the web console --><property name="host" value="0.0.0.0"/><property name="port" value="8161"/></bean>
web 的账户密码
[root@aa conf]# cat jetty-realm.properties
## ---------------------------------------------------------------------------
## Licensed to the Apache Software Foundation (ASF) under one or more
## contributor license agreements. See the NOTICE file distributed with
## this work for additional information regarding copyright ownership.
## The ASF licenses this file to You under the Apache License, Version 2.0
## (the "License"); you may not use this file except in compliance with
## the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------# Defines users that can access the web (console, demo, etc.)
# username: password [,rolename ...]
admin: admin, admin
制作服务
tee > /usr/lib/systemd/system/activemq.service <<-EOF
[Unit]
Description=ActiveMQ service
After=network.target
[Service]
Type=forking
ExecStart=/opt/apache-activemq-5.18.6/bin/activemq start
ExecStop=/opt/apache-activemq-5.18.6/bin/activemq stop
User=root
Group=root
Restart=always
RestartSec=9
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=activemq
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload && systemctl enable --now activemq
systemctl start activemq
systemctl status activemq