导读 | Apache ActiveMQ是Apache软件基金会所研发的开放源代码消息中间件;由于ActiveMQ是一个纯Java程序,因此只需要操作系统支持Java虚拟机,ActiveMQ便可执行。 |
下载安装
wget 'http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.8/apache-activemq-5.15.8-bin.tar.gz&action=download' -O apache-activemq-5.15.8-bin.tar.gz tar xzf apache-activemq-5.15.8-bin.tar.gz mv apache-activemq-5.15.8 /usr/local/activemq
修改配置
指定JAVA_HOME位置,修改/usr/local/activemq/bin/env
JAVA_HOME="/usr/java/jdk1.8.0_202"
修改密码,修改/usr/local/activemq/conf/jetty-realm.properties
# Defines users that can access the web (console, demo, etc.) # username: password [,rolename ...] *****: *****, ***** user: user, user
systemd自启动脚本
cat > /lib/systemd/system/activemq.service <>< eof="" [unit]="" description="ActiveMQ" service="" after="network.target" [service]="" type="forking" workingdirectory="/usr/local/activemq/data" execstart="/usr/local/activemq/bin/activemq" start="" execstop="/usr/local/activemq/bin/activemq" stop="" user="root" group="root" [install]="" wantedby="multi-user.target" eof="" systemctl="" enable="" activemq="" #开机自启动="" systemctl="" start="" activemq="" #启动="">
管理页面