第一步, 环境准备

更新CentOS7 ,安装epel-release,安装JDK,关闭防火墙

# yum clean all && yum update
# yum install -y epel-release && yum install -y java-1.8.0-openjdk
# systemctl disable firewalld
# systemctl stop firewalld

第二步,获取安装包

下载ActiveMQ安装包,并解压

# wget https://www.apache.org/dist/activemq/5.15.9/apache-activemq-5.15.9-bin.tar.gz
# tar -zxvf apache-activemq-5.15.9-bin.tar.gz -C /opt

第三步,配置开机启动

在/etc/init.d/ 目录下编写启动文件activemq

#!/bin/sh
#
# /etc/init.d/activemq
# chkconfig:
# description: activemq servlet container.
# processname: activemq 5.15. # Source function library.
#. /etc/init.d/functions
# source networking configuration.
#. /etc/sysconfig/network export ACTIVEMQ_HOME=/opt/apache-activemq-5.15.9 case $ in
start)
sh $ACTIVEMQ_HOME/bin/activemq start
;;
stop)
sh $ACTIVEMQ_HOME/bin/activemq stop
;;
status)
sh $ACTIVEMQ_HOME/bin/activemq status
;;
restart)
sh $ACTIVEMQ_HOME/bin/activemq stop
sleep
sh $ACTIVEMQ_HOME/bin/activemq start
;; esac
exit

赋予可执行权限

# chmod +x /etc/init.d/activemq

设置开机启动

# systemctl enable activemq

重启系统

# init 

第四步,测试效果

浏览器访问服务器ip:8161,默认用户名和密码 admin admin

Centos7 ActiveMQ 安装并配置为开机启动的更多相关文章

  1. [转]Linux(centOS6.5)下SVN的安装、配置及开机启动

    1.检查是否已安装 rpm -qa subversion 如果要卸载旧版本: yum remove subversion 2.安装 yum install subversion PS:yum inst ...

  2. Linux(centOS6.5)下SVN的安装、配置及开机启动

    http://www.blogjava.net/rockblue1988/archive/2014/11/19/420246.aspx

  3. CentOS7安装完毕,重新开机启动后显示: Initial setup of CentOS Linux 7 (core)

    CentOS7安装完毕,重新开机启动后显示: Initial setup of CentOS Linux 7 (core) 1) [x] Creat user 2) [!] License infor ...

  4. CentOS7安装Tomcat9并设置开机启动

    1.下载 Tomcat 9 CentOS 7 下创建目录并下载文件: cd /usr/local/ mkdir tomcat cd tomcat wget http://mirrors.hust.ed ...

  5. linux教程:配置Tomcat开机启动

    我们在linux下安装好tomcat之后:经常是需要配置到开机启动的: 这样的话就不需要我们每次重启linux服务器之后自己在登陆运行startup.sh文件启动tomcat了 本次的演示环境是在ce ...

  6. linux下配置Tomcat开机启动

    我们在linux下安装好tomcat之后:经常是需要配置到开机启动的: 这样的话就不需要我们每次重启linux服务器之后自己在登陆运行startup.sh文件启动tomcat了 本次的演示环境是在ce ...

  7. linux下activemq安装与配置activemq-5.15.2

    linux下activemq安装与配置 前提 配置好jdk环境   一.下载:apache-activemq-5.15.2-bin.tar.gz https://archive.apache.org/ ...

  8. centos7中安装、配置、验证、卸载redis

    本文介绍在centos7中安装.配置.验证.卸载redis等操作,以及在使用redis中的一些注意事项. 一 安装redis 1 创建redis的安装目录 利用以下命令,切换到/usr/local路径 ...

  9. 配置Supervisor开机启动

    配置Supervisor开机启动: 新建一个"supervisord.service"文件 # dservice for systemd (CentOS 7.0+) # by ET ...

随机推荐

  1. 关于spring的applicationContext.xml配置文件的ref和value之自我想法

    今天在做SSH的一个项目的时候,因为需要定时操作,所以就再sping里面加入了一个quartz的小定时框架,结果在运行时候,发生了一个小bug. Caused by: org.springframew ...

  2. linux 修改用户密码

    passwd 命令:用于对用户的密码进行管理,可以设置.修改.删除密码. 修改root用户的密码:$ sudo passwd root

  3. flask中current_app._get_current_object()与current_app有什么区别?

    https://segmentfault.com/q/1010000005865632/a-1020000005865704

  4. python学习笔记(二)— 集合

    s = set()#建立空的集合 s2 = {'}#没有:的为集合,集合天生去重 s3 = {'} #集合是也是无序的 # s2.add('a')#添加值 # s2.remove('2')#删除值 # ...

  5. mysql一个特殊的条件.字符串除以0的结果.

    select *  form  user  where  username = ''/1; 一开始一看以为还是错误的语法.... 结果出来一堆结果.. 原来条件是  ''除以1 ''除以1 结果是什么 ...

  6. ifram+form方式实现文件、图片上传、预览

    1.前端代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UT ...

  7. 【chainer框架】【pytorch框架】

    教程: https://bennix.github.io/ https://bennix.github.io/blog/2017/12/14/chain_basic/ https://bennix.g ...

  8. 【numpy】

    ndarray在某个维度上堆叠,np.stack() np.hstack() np.vstack() https://blog.csdn.net/csdn15698845876/article/det ...

  9. js小数四舍五入,保留两位小数

    直接用用number.toFixed(2)即可 <template> <section class="p-10"> <h1> {{ number ...

  10. Jenkins部分常用插件