当前位置: 代码迷 >> 综合 >> 2021-05-19【总结liunx-shell常用命令】
  详细解决方案

2021-05-19【总结liunx-shell常用命令】

热度:67   发布时间:2023-10-12 23:23:26.0

1,查找服务器对应的服务pid,并杀掉该进程

ps -aef | grep java|grep "/某服务/server1/"| grep -v grep | sed 's/ [ ]*/:/g' |cut -d: -f2|kill -9 `cat`
 

2,启动脚本 start.sh

#!/bin/bash
export CATALINA_HOME=/export/servers/tomcat8.0.42
export CATALINA_BASE=/export/Domains/某服务/server1
export JAVA_HOME=/export/servers/jdk1.8.0_66
export JAVA_BIN=/export/servers/jdk1.8.0_66/bin
export PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/bin
export CLASSPATH=.:/lib/dt.jar:/lib/tools.jar
export  JAVA_OPTS="-Djava.library.path=/usr/local/lib -server -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dsun.net.client.defaultConnectTimeout=60000 -Dsun.net.client.defaultReadTimeout=60000 -Djmagick.systemclassloader=no -Dnetworkaddress.cache.ttl=300 -Dsun.n