当前位置:Gxlcms > mysql > WeblogicServer启动脚本

WeblogicServer启动脚本

时间:2021-07-01 10:21:17 帮助过:100人阅读

一、 Linux 下 app01 应用server启动脚本如下: #!/bin/sh ----aix或者hpux下 #!/bin/ksh if [ `whoami` !=

一、 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端口 ----- 如::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

推荐阅读:

Oracle WebLogic 11g 安装部署文档 PDF

Linux部署Weblogic11g

Oracle基础教程之安装与配置Weblogic单实例

Linux下Weblogic卸载

Weblogic多机器集群的配置

Weblogic的安装和配置

linux

人气教程排行