CentOS 7下ActiveMQ安装配置

  • A+
所属分类:Linux

下载安装

  1. 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
  2. tar xzf apache-activemq-5.15.8-bin.tar.gz
  3. mv apache-activemq-5.15.8 /usr/local/activemq

修改配置

指定JAVA_HOME位置,修改/usr/local/activemq/bin/env

  1. JAVA_HOME="/usr/java/jdk1.8.0_202"

修改密码,修改/usr/local/activemq/conf/jetty-realm.properties

  1. # Defines users that can access the web (console, demo, etc.)
  2. # username: password [,rolename ...]
  3. admin: admin, admin
  4. user: user, user

systemd自启动脚本

  1. cat > /lib/systemd/system/activemq.service << EOF
  2. [Unit]
  3. Description=ActiveMQ service
  4. After=network.target
  5. [Service]
  6. Type=forking
  7. WorkingDirectory=/usr/local/activemq/data
  8. ExecStart=/usr/local/activemq/bin/activemq start
  9. ExecStop=/usr/local/activemq/bin/activemq stop
  10. User=root
  11. Group=root
  12. [Install]
  13. WantedBy=multi-user.target
  14. EOF
  15. systemctl enable activemq #开机自启动
  16. systemctl start activemq #启动

管理页面

CentOS 7下ActiveMQ安装配置

Tue Mar 5 15:43:47 CST 2019

avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: