zoukankan      html  css  js  c++  java
  • Linux下安装activeMQ并设置开机启动

    ActiveMQ安装并设置开机启动

    ActiveMQ是实现了JMS1.1规范的,面向消息(MOM)的中间件,能够跨越多语言和多系统的应用提供消息通信。

    v ActionMQ的安装

    安装依赖:JDK

    安装环境:linux

    1. 上传ActionMQ压缩包(自己找gz结尾的Linux下activemq压缩包)

    apache-activemq-5.12.0-bin.tar.gz

     2. liunx环境下,将共享目录apache-activemq-5.12.0-bin.tar.gz

    拷贝到/usr/local/taotao_shop/activeMQ

     

    3. 解压apache-activemq-5.12.0-bin.tar.gz

     

    4. activeMQ的安装目录的bin下执行命令

    使用bin目录下的activemq命令启动:

    [root@localhost bin]# ./activemq start

     

    关闭:

    [root@localhost bin]# ./activemq stop

     

    查看状态:

    [root@localhost bin]# ./activemq status

     

    v ActionMQ开机自动启动

    1. activeMQ安装目录下的bin中的activemq文件拷贝到修改init.d/目录下

     

    2. 修改/etc/init.d/目录下activemq文件

    (1) 在第二行加入如下内容:

    #### BEGIN INIT INFO
    # Provides:             activemq
    # Required-Start:       $remote_fs $syslog
    # Required-Stop:        $remote_fs $syslog
    # Default-Start:        2 3 4 5
    # Default-Stop:         0 6
    # chkconfig: 2345 64 36
    # Short-Description:    ActiveMQ server
    ### END INIT INFO

     

    (2) 再添加如下内容

    export JAVA_HOME=/usr/taotao_shop/jdk/ jdk1.7.0_71

    ACTIVEMQ_HOME=/usr/local/taotao_shop/activeMQ/apache-activemq-5.12.0

     

    3. 修改activemq的执行权限

     

    4. 设置activemq开机启动

     

    5. 查看activemq服务

     

    6. 执行命令开启activemq/关闭activemq/查看activemq状态

    开启activemq: service activemq start

    关闭activemq:service activemq stop

    查看状态: service activemq status

     

    OK! 到此activeMQ安装并设置开机启动完成。

    GET 没 ?

               (●'◡'●)

  • 相关阅读:
    在CentOS 7.6上安装VNC Server
    CentOS7.6 安装Docker
    CentOS 7.6 安装 Weblogic 12
    CentOS 7.6 安装Oracle 12c
    Spring MVC 使用介绍(五)—— 注解式控制器(一):基本介绍
    Spring MVC 使用介绍(四)—— 拦截器
    Spring MVC 使用介绍(三)—— Controller接口控制器
    Spring MVC 使用介绍(二)—— DispatcherServlet
    Spring MVC 使用介绍(一)—— 概述
    Spring 使用介绍(十三)—— Bean的生命周期
  • 原文地址:https://www.cnblogs.com/lucia557/p/7602155.html
Copyright © 2011-2022 走看看