一.linux 下
app01 应用server启动脚本如下:
#!/bin/sh----aix或者hpux下 #!/bin/ksh
if [ `whoami` != 'weblogic' ]; then
echo 'Login User error!'
exit 9
fi
export srvName=app01
export adminUrl=http://管理server ip :管理server端口 ----- 如:http://11.11.11.11:7007
export startDate=`date +%m%d%H%M`
export domainDir=/home/weblogic/bea/user_projects/domains/appDomain
export logDir=/home/weblogic/ServerLog
export procCount=`ps -ef|grep "weblogic.Name=${srvName}"|grep -v "grep"|wc -l`
if [ $procCount != '0' ]; then
echo 'Warning! This server has been started!'
exit 9
fi
cd $domainDir/bin
test -d $logDir || mkdir -p $logDir
export USER_MEM_ARGS="-Xms2560m -Xmx2560m -XX:MaxPermSize=512m"------- 内存根据自身机器环境设定
nohup ./startManagedWebLogic.sh $srvName $adminUrl > $logDir/$srvName.$startDate.log 2>&1 &
cd $logDir
rm -f $srvName.log
ln -s $srvName.$startDate.log $srvName.log
Admin admin server 启动脚本:
#!/bin/sh
if [ `whoami` != 'weblogic' ]; then
echo 'Login User error!'
exit 9
fi
export srvName=appAdmin
export startDate=`date +%m%d%H%M`
export domainDir=/home/weblogic/bea/user_projects/domains/appDomain
export logDir=/home/weblogic/ServerLog
export procCount=`ps -ef|grep "weblogic.Name=${srvName}"|grep -v "grep"|wc -l`
if [ $procCount != '0' ]; then
echo 'Warning! This server has been started!'
exit 9
fi
cd $domainDir
test -d $logDir || mkdir -p $logDir
export USER_MEM_ARGS="-Xms512m -Xmx512m -XX:MaxPermSize=256m"
nohup ./startWebLogic.sh > $logDir/$srvName.$startDate.log 2>&1 &
cd $logDir
rm -f $srvName.log
ln -s $srvName.$startDate.log $srvName.log
二.windows 下
app01 一般应用 server 启动脚本:
@echo off
set SERVER_NAME=app01
set ADMIN_URL=http://管理server ip :管理server端口
cd D:\Oracle\Middleware\user_projects\domains\appdomain\bin
set USER_MEM_ARGS=-Xms2560m -Xmx2560m -XX:MaxPermSize=512m
call startManagedWebLogic.cmd %SERVER_NAME% %ADMIN_URL%
admin server 启动脚本:
@ECHO OFF
@REM WARNING: This file is created by the Configuration Wizard.
@REM Any changes to this script may be lost when adding extensions to this configuration.
SETLOCAL
set DOMAIN_HOME=d:\Oracle\Middleware\user_projects\domains\appdomain
cd %DOMAIN_HOME%
set USER_MEM_ARGS=-Xms1280m -Xmx1280m -XX:MaxPermSize=512m
call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %*
ENDLOCAL