Centos 搭建activemq

Centos 搭建activemq 

1,官方下载  http://activemq.apache.org/activemq-5122-release.html   

apache-activemq-5.15.2-bin.tar.gz

 

2,tar -zxvf apache-activemq-5.15.2-bin.tar.gz

 

 

 

3 开启自启

 cd /etc/init.d/

 vi activemq

 insert and   save  下面自启内容

#!/bin/sh

#export JAVA_HOME=/

export CATALINA_HOME=/usr/activemq/apache-activemq-5.15.2

case $1 in

    start)

        sh $CATALINA_HOME/bin/activemq start

    ;;

    stop)

        sh $CATALINA_HOME/bin/activemq stop

    ;;

    restart)

        sh $CATALINA_HOME/bin/activemq stop

        sleep 1

        sh $CATALINA_HOME/bin/activemq start

    ;;

esac

exit 0

设置可执行权限

chmod 777 activemq

设置开机启动并启动activemq

chkconfig activemq on  (关闭off)

service activemq start

不设置开机启动,可进入bin目录找到对应系统位数的文件夹中  ./activemq start/consle   start是后台运行consle是打印日志运行

 

4 测试

设置并打开防火墙8161

firewall-cmd --zone=public --add-port=8161/tcp --permanent

#更新防火墙

firewall-cmd --complete-reload

win访问centos并测试

 

注意:

服务中使用时连接的端口号是61616.别傻乎乎以为是8161

转载于:https://www.cnblogs.com/zxg-blog/p/10514984.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值