300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > linux设置activemq开机启动 Activemq(centos7)开机自启动服务

linux设置activemq开机启动 Activemq(centos7)开机自启动服务

时间:2020-01-05 21:58:57

相关推荐

linux设置activemq开机启动 Activemq(centos7)开机自启动服务

编辑服务文件

vi /etc/init.d/activemq

文件内容如下

#!/bin/bash

# chkconfig: 2345 10 90

# description: activemq ....

prog=tomcat

JAVA_HOME=/usr/local/java/jdk1.7.0_25

export JAVA_HOME

CATALANA_HOME=/home/activemq

export CATALINA_HOME

case "$1" in

start)

echo "Starting $prog..."

$CATALANA_HOME/bin/activemq start

;;

stop)

echo "Stopping $prog..."

$CATALANA_HOME/bin/activemq stop

;;

restart)

echo "Stopping $prog..."

$CATALANA_HOME/bin/activemq stop

sleep 2

echo

echo "Starting $prog..."

$CATALANA_HOME/bin/activemq start

;;

*)

echo "Usage: $prog {start|stop|restart}"

;;

esac

exit

给予权限

chmod +x activemq

*设置开机自启动

制作软连接

ln -s /etc/init.d/activemq /etc/rc3.d/$01activemq

或者用开机自启动命令chkconfig

chkconfig activemq on

标签:bin,activemq,CATALANA,echo,centos7,prog,自启动,HOME,Activemq

来源: /wdzhz/p/11014372.html

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。