[시작, startMg1.sh]
#export LANG=ko_KR
USER=oracle
IAM=`whoami`
SERVER_NAME=매니지드서버명
export DOMAIN_HOME="/oracle/domains/도메인명"
LOG_NAME=$SERVER_NAME
LOG_DIR=$DOMAIN_HOME/logs
# process running
PID=`ps -ef|grep java|grep $SERVER_NAME|awk '{print $2}'`
if [ "$PID" != "" ]
then
echo $SERVER_NAME process is running !!!
exit
fi
# user validate
if [ $USER != $IAM ]
then
echo "Startup user invalid, script owner is $USER"
exit
fi
#############################################
## edit by jbkoo
USER_MEM_ARGS="-D$SERVER_NAME -Xms512m -Xmx1024m -XX:PermSize=256m -Dweblogic.Chunksize=65535 -Dweblogic.management.username=웹로직어드민서버아이디 -Dweblogic.management.password=웹로직어드민서버비밀번호 -Djava.security.egd=file:/dev/./urandom"
export USER_MEM_ARGS
#############################################
mkdir -p $LOG_DIR
mkdir -p $LOG_DIR/backup
mv $LOG_DIR/$LOG_NAME.log $LOG_DIR/backup/$LOG_NAME.log.`date '+20%y%m%d_%H%M%S'`
sleep 2
nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh $SERVER_NAME t3://웹로직어드민서버IP:19701 >> $LOG_DIR/$LOG_NAME.log &
sleep 2
tail -f $LOG_DIR/$LOG_NAME.log
[종료, stopMg1.sh]
. ./bin/setDomainEnv.sh
java weblogic.Admin -url t3://웹로직매니지드서버IP:19705 -username 웹로직어드민아이디 -password 웹로직어드민비밀번호 FORCESHUTDOWN