Centos下Web中间件Jboss应用发布start和stop脚本范例

在centos环境部署jboss发布web应用,摸索了发布具体应用的start和stop脚本,范例如下:


1、start脚本:${JBOSS_HOME}/bin/start-app.sh

export LANG=zh_CN.GBK
cd /home/jboss/bin
date=1_`date +%Y-%m-%d\ %H:%M`.log

nohup ./run.sh -b 127.0.0.1 -c app > "logs/app.logs" &

2、stop脚本:${JBOSS_HOME}/bin/stop-app.sh

cd /home/jboss/bin
echo `date +%F\ %T` >> logs/shutdown.log
nohup ./shutdown.sh -S -s 127.0.0.1:1199 -u admin -p admin >> "logs/shutdown.log" 2>&1 &

stop脚本最主要是端口和用户名密码,其中服务器配置的JNDI端口(默认端口为1099)在${JBOSS_HOME}/server/app/conf/jboss-service.xml文件中:

<mbean code="org.jboss.naming.NamingService"
            name="jboss:service=Naming"
      xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
      <!-- The call by value mode. true if all lookups are unmarshalled using
         the caller's TCL, false if in VM lookups return the value by reference.
      -->
      <attribute name="CallByValue">false</attribute>
      <!-- The listening port for the bootstrap JNP service. Set this to -1
         to run the NamingService without the JNP invoker listening port.
      -->
      <attribute name="Port">1099</attribute>
      <!-- The bootstrap JNP server bind address. This also sets the default
         RMI service bind address. Empty == all addresses
      -->

用户名和密码在${JBOSS_HOME}/server/app/conf/props/jmx-console-users.properties文件中,也可以新增,如admin=admin


 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值