ActiveMQ在Linux环境下安装

1、下载最新版本ActiveMQ

         下载地址如下,目前最新版本为:apache-activemq-5.15.2-bin.tar.gz

          http://activemq.apache.org/download.html

2、解压ActiveMQ

        解压目录为:/home/zz/user/

tar -zvxf apache-activemq-5.15.2-bin.tar.gz

3、配置服务启动

        在/etc/init.d 目录下新建 activemq 文件,内容如下:

#!/bin/bash
cd /home/zz/user/
start() {
    echo "正在启动ActiveMQ服务..."
    apache-activemq-5.15.3/bin/linux-x86-64/activemq start
    echo "启动ActiveMQ服务完成。"
}
restart() {
    echo "正在重新启动ActiveMQ服务..."
    apache-activemq-5.15.3/bin/linux-x86-64/activemq restart
    echo "重新启动ActiveMQ服务完成。"
}
stop() {
    echo "正在关闭ActiveMQ服务..."
    apache-activemq-5.15.3/bin/linux-x86-64/activemq stop
    echo "关闭ActiveMQ服务完成。"
}
status() {
    apache-activemq-5.15.3/bin/linux-x86-64/activemq status
}
case "$1" in
start)
  start
  ;;
stop)
  stop
  ;;
reload|restart)
  restart
  ;;
status)
  status $SNAME
  ;;
*)
  echo $"Usage: $0 {start|stop|restart|status}"
  exit 1
esac

4、操作ActiveMQ

[zz@localhost software]$ service activemq start
[zz@localhost software]$ service activemq stop
[zz@localhost software]$ service activemq restart
[zz@localhost software]$ service activemq status

5、查看ActiveMQ运行状态

    ActiveMQ管理界面:http://localhost:8161,默认管理员用户密码:admin/admin

 

转载于:https://my.oschina.net/ruoli/blog/1594657

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值