#!/bin/sh
#rm -f gc.xml nohup.out
if [ ! -d backup ]; then
mkdir backup
fi
# 生成错误报告文件
if [ -f nohup.out ]; then
mv nohup.out backup/nohup.out.$DT
chmod 755 backup/nohup.out.$DT
fi
if [ -f gc.log ]; then
mv gc.log backup/gc.log.$DT
fi
pid=`ps -fe | grep java | grep $USER | grep -v grep | awk '{print $2}'`
if [ "$pid" != "" ]; then
echo $pid
kill -9 $pid
fi
sleep 2
#weblogic adminserver 控制端口
export WLS_ADM_PORT=2011
export WLS_USER=weblogic
export WLS_PW=weblogic
export DOMAIN_HOME=$HWORKDIR/bea/domain01/
export EXTRA_JAVA_PROPERTIES=" -Djava.awt.headless=true -DUseSunHttpHandler=true "
export EXT_POST_CLASSPATH=${HWORKDIR}:${HWORKDIR}/app
export USER_MEM_ARGS="-Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m"
nohup ./startWebLogic.sh 2>adminServer.error &
printf "正在启动管理服务器,请稍等"
while [ 1 ] ; do
num=`netstat -an | grep -w $WLS_ADM_PORT | grep -w "LISTEN" | wc -l`
if [ $num -ge 1 ]; then
break;
fi
printf "."
sleep 1
done
说明:此脚本为启动adminserver用,如果其他受管理服务则不实用.