`
alvinqq
  • 浏览: 185295 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

Jboss启动&&停止

    博客分类:
  • java
阅读更多
建两个shell脚本start.sh、stop.sh

[root@prjboss01 ~]# cat /opt/jboss/bin/start.sh 
#!/bin/bash
cd /opt/jboss/bin
nohup sh run.sh -b 0.0.0.0 &
echo "log:/opt/jboss/bin/nohup.out"
[root@prjboss01 ~]# cat /opt/jboss/bin/stop.sh 
#!/bin/bash
for i in `ps auxwww |grep -w 'jboss' |egrep -v 'grep|stop.sh'|awk '{print $2}'` ; do
kill -9 $i
done
rm /opt/jboss/server/default/data/* -rf
rm /opt/jboss/server/default/tmp/* -rf
rm /opt/jboss/server/default/work/* -rf
echo "clear database..."
for tb in `/usr/local/mysql/bin/mysql -A jbossdb -e "show tables" | sed '1d'`;do /usr/local/mysql/bin/mysql -A jbossdb -e "DROP TABLE $tb";done
echo "stop OK"
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics