精华内容
下载资源
问答
  • linux weblogic的sh文件

    2017-08-17 19:54:00
    setDomainEnv.sh JAVA_HOME和各种jvm参数,CLASSPATH都在这里配置 #!/bin/sh # WARNING: This file is created by the Configuration Wizard. # Any changes to this script may be lost when adding ...

     

    setDomainEnv.sh

     

    JAVA_HOME和各种jvm参数,CLASSPATH都在这里配置

    #!/bin/sh

     

    # WARNING: This file is created by the Configuration Wizard.

    # Any changes to this script may be lost when adding extensions to this configuration.

     

    # --- Start Functions ---

     

    BP=100

    SP=$BP

     

    pushd()

    {

        if [ -z "$1" ]

        then

            return

        fi

     

        SP=`expr $SP - 1`

        eval _stack$SP=`pwd`

        cd $1

        return

    }

     

    popd()

    {

        if [ $SP -eq $BP ]

        then

            return

        fi

        eval cd \${_stack$SP}

        SP=`expr $SP + 1`

        return

    }

     

     

    # --- End Functions ---

     

    # *************************************************************************

    # This script is used to setup the needed environment to be able to start Weblogic Server in this domain.

    #

    # This script initializes the following variables before calling commEnv to set other variables:

    #

    # WL_HOME - The BEA home directory of your WebLogic installation.

    # JAVA_VM - The desired Java VM to use. You can set this environment variable before calling

    # this script to switch between Sun or BEA or just have the default be set.

    # JAVA_HOME - Location of the version of Java used to start WebLogic

    # Server. Depends directly on which JAVA_VM value is set by default or by the environment.

    # USER_MEM_ARGS - The variable to override the standard memory arguments

    # passed to java.

    # PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.

    # DOMAIN_PRODUCTION_MODE

    # - The variable that determines whether the workshop related settings like the debugger,

    # testconsole or iterativedev should be enabled. ONLY settable using the

    # command-line parameter named production

    # NOTE: Specifying the production command-line param will force

    # the server to start in production mode.

    #

    # Other variables used in this script include:

    # SERVER_NAME - Name of the weblogic server.

    # JAVA_OPTIONS - Java command-line options for running the server. (These

    # will be tagged on to the end of the JAVA_VM and

    # MEM_ARGS)

    #

    # For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"

    # (http://download.oracle.com/docs/cd/E12839_01/web.1111/e13708/overview.htm).

    # *************************************************************************

     

    WL_HOME="/s"

    export WL_HOME

     

    BEA_JAVA_HOME="/weblogic/jrockit_160_14_R27.6.5-32"

    export BEA_JAVA_HOME

     

    SUN_JAVA_HOME="/weblogic/jdk160_14_R27.6.5-32"

    export SUN_JAVA_HOME

     

    if [ "${JAVA_VENDOR}" = "Oracle" ] ; then

        JAVA_HOME="${BEA_JAVA_HOME}"

        export JAVA_HOME

    else

        if [ "${JAVA_VENDOR}" = "Sun" ] ; then

            JAVA_HOME="${SUN_JAVA_HOME}"

            export JAVA_HOME

        else

            JAVA_VENDOR="Sun"

            export JAVA_VENDOR

            JAVA_HOME="/weblogic/jdk160_14_R27.6.5-32"

            export JAVA_HOME

        fi

    fi

     

    # We need to reset the value of JAVA_HOME to get it shortened AND

    # we can not shorten it above because immediate variable expansion will blank it

     

    JAVA_HOME="${JAVA_HOME}"

    export JAVA_HOME

     

    SAMPLES_HOME="${WL_HOME}/samples"

    export SAMPLES_HOME

     

    DOMAIN_HOME="/weblogic/user_projects/domains/base_domain"

    export DOMAIN_HOME

     

    LONG_DOMAIN_HOME="/weblogic/user_projects/domains/base_domain"

    export LONG_DOMAIN_HOME

     

    if [ "${DEBUG_PORT}" = "" ] ; then

        DEBUG_PORT="8453"

        export DEBUG_PORT

    fi

     

    if [ "${SERVER_NAME}" = "" ] ; then

        SERVER_NAME="AdminServer"

        export SERVER_NAME

    fi

     

    POINTBASE_FLAG="false"

    export POINTBASE_FLAG

     

    enableHotswapFlag=""

    export enableHotswapFlag

     

    PRODUCTION_MODE=""

    export PRODUCTION_MODE

     

    doExitFlag="false"

    export doExitFlag

    verboseLoggingFlag="false"

    export verboseLoggingFlag

    while [ $# -gt 0 ]

    do

        case $1 in

        nodebug)

            debugFlag="false"

            export debugFlag

            ;;

        production)

            DOMAIN_PRODUCTION_MODE="true"

            export DOMAIN_PRODUCTION_MODE

            ;;

        notestconsole)

            testConsoleFlag="false"

            export testConsoleFlag

            ;;

        noiterativedev)

            iterativeDevFlag="false"

            export iterativeDevFlag

            ;;

        noLogErrorsToConsole)

            logErrorsToConsoleFlag="false"

            export logErrorsToConsoleFlag

            ;;

        nopointbase)

            POINTBASE_FLAG="false"

            export POINTBASE_FLAG

            ;;

        doExit)

            doExitFlag="true"

            export doExitFlag

            ;;

        noExit)

            doExitFlag="false"

            export doExitFlag

            ;;

        verbose)

            verboseLoggingFlag="true"

            export verboseLoggingFlag

            ;;

        enableHotswap)

            enableHotswapFlag="-javaagent:${WL_HOME}/server/lib/diagnostics-agent.jar"

            export enableHotswapFlag

            ;;

        *)

            PROXY_SETTINGS="${PROXY_SETTINGS} $1"

            export PROXY_SETTINGS

            ;;

        esac

        shift

    done

     

     

    MEM_DEV_ARGS=""

    export MEM_DEV_ARGS

     

    if [ "${DOMAIN_PRODUCTION_MODE}" = "true" ] ; then

        PRODUCTION_MODE="${DOMAIN_PRODUCTION_MODE}"

        export PRODUCTION_MODE

    fi

     

    if [ "${PRODUCTION_MODE}" = "true" ] ; then

        debugFlag="false"

        export debugFlag

        testConsoleFlag="false"

        export testConsoleFlag

        iterativeDevFlag="false"

        export iterativeDevFlag

        logErrorsToConsoleFlag="false"

        export logErrorsToConsoleFlag

    fi

     

    # If you want to override the default Patch Classpath, Library Path and Path for this domain,

    # Please uncomment the following lines and add a valid value for the environment variables

    # set PATCH_CLASSPATH=[myPatchClasspath] (windows)

    # set PATCH_LIBPATH=[myPatchLibpath] (windows)

    # set PATCH_PATH=[myPatchPath] (windows)

    # PATCH_CLASSPATH=[myPatchClasspath] (unix)

    # PATCH_LIBPATH=[myPatchLibpath] (unix)

    # PATCH_PATH=[myPatchPath] (unix)

     

    . ${WL_HOME}/common/bin/commEnv.sh

     

    WLS_HOME="${WL_HOME}/server"

    export WLS_HOME

     

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then

        WLS_MEM_ARGS_64BIT="-Xms256m -Xmx512m"

        export WLS_MEM_ARGS_64BIT

        WLS_MEM_ARGS_32BIT="-Xms256m -Xmx512m"

        export WLS_MEM_ARGS_32BIT

    else

        WLS_MEM_ARGS_64BIT="-Xms512m -Xmx512m"

        export WLS_MEM_ARGS_64BIT

        WLS_MEM_ARGS_32BIT="-Xms512m -Xmx512m"

        export WLS_MEM_ARGS_32BIT

    fi

     

    MEM_ARGS_64BIT="${WLS_MEM_ARGS_64BIT}"

    export MEM_ARGS_64BIT

     

    MEM_ARGS_32BIT="${WLS_MEM_ARGS_32BIT}"

    export MEM_ARGS_32BIT

     

    if [ "${JAVA_USE_64BIT}" = "true" ] ; then

        MEM_ARGS="${MEM_ARGS_64BIT}"

        export MEM_ARGS

    else

        MEM_ARGS="${MEM_ARGS_32BIT}"

        export MEM_ARGS

    fi

     

    MEM_PERM_SIZE_64BIT="-XX:PermSize=128m"

    export MEM_PERM_SIZE_64BIT

     

    MEM_PERM_SIZE_32BIT="-XX:PermSize=48m"

    export MEM_PERM_SIZE_32BIT

     

    if [ "${JAVA_USE_64BIT}" = "true" ] ; then

        MEM_PERM_SIZE="${MEM_PERM_SIZE_64BIT}"

        export MEM_PERM_SIZE

    else

        MEM_PERM_SIZE="${MEM_PERM_SIZE_32BIT}"

        export MEM_PERM_SIZE

    fi

     

    MEM_MAX_PERM_SIZE_64BIT="-XX:MaxPermSize=256m"

    export MEM_MAX_PERM_SIZE_64BIT

     

    MEM_MAX_PERM_SIZE_32BIT="-XX:MaxPermSize=128m"

    export MEM_MAX_PERM_SIZE_32BIT

     

    if [ "${JAVA_USE_64BIT}" = "true" ] ; then

        MEM_MAX_PERM_SIZE="${MEM_MAX_PERM_SIZE_64BIT}"

        export MEM_MAX_PERM_SIZE

    else

        MEM_MAX_PERM_SIZE="${MEM_MAX_PERM_SIZE_32BIT}"

        export MEM_MAX_PERM_SIZE

    fi

     

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then

        if [ "${PRODUCTION_MODE}" = "" ] ; then

            MEM_DEV_ARGS="-XX:CompileThreshold=8000 ${MEM_PERM_SIZE} "

            export MEM_DEV_ARGS

        fi

    fi

     

    # Had to have a separate test here BECAUSE of immediate variable expansion on windows

     

    if [ "${JAVA_VENDOR}" = "Sun" ] ; then

        MEM_ARGS="${MEM_ARGS} ${MEM_DEV_ARGS} ${MEM_MAX_PERM_SIZE}"

        export MEM_ARGS

    fi

     

    if [ "${JAVA_VENDOR}" = "HP" ] ; then

        MEM_ARGS="${MEM_ARGS} ${MEM_MAX_PERM_SIZE}"

        export MEM_ARGS

    fi

     

    if [ "${JAVA_VENDOR}" = "Apple" ] ; then

        MEM_ARGS="${MEM_ARGS} ${MEM_MAX_PERM_SIZE}"

        export MEM_ARGS

    fi

     

    if [ "${JAVA_VENDOR}" = "IBM" ] ; then

        MEM_ARGS="${MEM_ARGS} ${MEM_MAX_PERM_SIZE}"

        export MEM_ARGS

    fi

     

    # IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values

     

    if [ "${USER_MEM_ARGS}" != "" ] ; then

        MEM_ARGS="${USER_MEM_ARGS}"

        export MEM_ARGS

    fi

     

    JAVA_PROPERTIES="-Dplatform.home=${WL_HOME} -Dwls.home=${WLS_HOME} -Dweblogic.home=${WLS_HOME} "

    export JAVA_PROPERTIES

     

    # To use Java Authorization Contract for Containers (JACC) in this domain,

    # please uncomment the following section. If there are multiple machines in

    # your domain, be sure to edit the setDomainEnv in the associated domain on

    # each machine.

    #

    # -Djava.security.manager

    # -Djava.security.policy=location of weblogic.policy

    # -Djavax.security.jacc.policy.provider=weblogic.security.jacc.simpleprovider.SimpleJACCPolicy

    # -Djavax.security.jacc.PolicyConfigurationFactory.provider=weblogic.security.jacc.simpleprovider.PolicyConfigurationFactoryImpl

    # -Dweblogic.security.jacc.RoleMapperFactory.provider=weblogic.security.jacc.simpleprovider.RoleMapperFactoryImpl

     

    JAVA_PROPERTIES="${JAVA_PROPERTIES} ${EXTRA_JAVA_PROPERTIES}"

    export JAVA_PROPERTIES

     

    ARDIR="${WL_HOME}/server/lib"

    export ARDIR

     

    pushd ${LONG_DOMAIN_HOME}

     

    # Clustering support (edit for your cluster!)

     

    if [ "${ADMIN_URL}" = "" ] ; then

        # The then part of this block is telling us we are either starting an admin server OR we are non-clustered

        CLUSTER_PROPERTIES="-Dweblogic.management.discover=true"

        export CLUSTER_PROPERTIES

    else

        CLUSTER_PROPERTIES="-Dweblogic.management.discover=false -Dweblogic.management.server=${ADMIN_URL}"

        export CLUSTER_PROPERTIES

    fi

     

    if [ "${LOG4J_CONFIG_FILE}" != "" ] ; then

        JAVA_PROPERTIES="${JAVA_PROPERTIES} -Dlog4j.configuration=file:${LOG4J_CONFIG_FILE}"

        export JAVA_PROPERTIES

    fi

     

    JAVA_PROPERTIES="${JAVA_PROPERTIES} ${CLUSTER_PROPERTIES}"

    export JAVA_PROPERTIES

     

    JAVA_DEBUG=""

    export JAVA_DEBUG

     

    if [ "${debugFlag}" = "true" ] ; then

        JAVA_DEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=${DEBUG_PORT},server=y,suspend=n -Djava.compiler=NONE"

        export JAVA_DEBUG

        JAVA_OPTIONS="${JAVA_OPTIONS} ${enableHotswapFlag} -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole..."

        export JAVA_OPTIONS

    else

        JAVA_OPTIONS="${JAVA_OPTIONS} ${enableHotswapFlag} -da"

        export JAVA_OPTIONS

    fi

     

    if [ ! -d ${JAVA_HOME}/lib ] ; then

        echo "The JRE was not found in directory ${JAVA_HOME}. (JAVA_HOME)"

        echo "Please edit your environment and set the JAVA_HOME"

        echo "variable to point to the root directory of your Java installation."

        popd

        read _val

        exit

    fi

     

    if [ "${POINTBASE_FLAG}" = "true" ] ; then

        DATABASE_CLASSPATH="${POINTBASE_CLASSPATH}"

        export DATABASE_CLASSPATH

    else

        DATABASE_CLASSPATH="${POINTBASE_CLIENT_CLASSPATH}"

        export DATABASE_CLASSPATH

    fi

     

    if [ "${DATABASE_CLASSPATH}" != "" ] ; then

        if [ "${POST_CLASSPATH}" != "" ] ; then

            POST_CLASSPATH="${POST_CLASSPATH}${CLASSPATHSEP}${DATABASE_CLASSPATH}"

            export POST_CLASSPATH

        else

            POST_CLASSPATH="${DATABASE_CLASSPATH}"

            export POST_CLASSPATH

        fi

    fi

     

    if [ "${ARDIR}" != "" ] ; then

        if [ "${POST_CLASSPATH}" != "" ] ; then

            POST_CLASSPATH="${POST_CLASSPATH}${CLASSPATHSEP}${ARDIR}/xqrl.jar"

            export POST_CLASSPATH

        else

            POST_CLASSPATH="${ARDIR}/xqrl.jar"

            export POST_CLASSPATH

        fi

    fi

     

    # PROFILING SUPPORT

     

    JAVA_PROFILE=""

    export JAVA_PROFILE

     

    SERVER_CLASS="weblogic.Server"

    export SERVER_CLASS

     

    JAVA_PROPERTIES="${JAVA_PROPERTIES} ${WLP_JAVA_PROPERTIES}"

    export JAVA_PROPERTIES

     

    JAVA_OPTIONS="${JAVA_OPTIONS} ${JAVA_PROPERTIES} -Dwlw.iterativeDev=${iterativeDevFlag} -Dwlw.testConsole=${testConsoleFlag} -Dwlw.logErrorsToConsole=${logErrorsToConsoleFlag}"

    export JAVA_OPTIONS

     

    if [ "${DOMAIN_PRODUCTION_MODE}" = "true" ] ; then

        JAVA_OPTIONS=" -Dweblogic.ProductionModeEnabled=true ${JAVA_OPTIONS}"

        export JAVA_OPTIONS

    fi

     

    # -- Setup properties so that we can save stdout and stderr to files

     

    if [ "${WLS_STDOUT_LOG}" != "" ] ; then

        echo "Logging WLS stdout to ${WLS_STDOUT_LOG}"

        JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.Stdout=${WLS_STDOUT_LOG}"

        export JAVA_OPTIONS

    fi

     

    if [ "${WLS_STDERR_LOG}" != "" ] ; then

        echo "Logging WLS stderr to ${WLS_STDERR_LOG}"

        JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.Stderr=${WLS_STDERR_LOG}"

        export JAVA_OPTIONS

    fi

     

    # ADD EXTENSIONS TO CLASSPATHS

     

    if [ "${EXT_PRE_CLASSPATH}" != "" ] ; then

        if [ "${PRE_CLASSPATH}" != "" ] ; then

            PRE_CLASSPATH="${EXT_PRE_CLASSPATH}${CLASSPATHSEP}${PRE_CLASSPATH}"

            export PRE_CLASSPATH

        else

            PRE_CLASSPATH="${EXT_PRE_CLASSPATH}"

            export PRE_CLASSPATH

        fi

    fi

     

    if [ "${EXT_POST_CLASSPATH}" != "" ] ; then

        if [ "${POST_CLASSPATH}" != "" ] ; then

            POST_CLASSPATH="${POST_CLASSPATH}${CLASSPATHSEP}${EXT_POST_CLASSPATH}"

            export POST_CLASSPATH

        else

            POST_CLASSPATH="${EXT_POST_CLASSPATH}"

            export POST_CLASSPATH

        fi

    fi

     

    if [ "${WEBLOGIC_EXTENSION_DIRS}" != "" ] ; then

        JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.ext.dirs=${WEBLOGIC_EXTENSION_DIRS}"

        export JAVA_OPTIONS

    fi

     

    JAVA_OPTIONS="${JAVA_OPTIONS}"

    export JAVA_OPTIONS

     

    # SET THE CLASSPATH

     

    if [ "${WLP_POST_CLASSPATH}" != "" ] ; then

        if [ "${CLASSPATH}" != "" ] ; then

            CLASSPATH="${WLP_POST_CLASSPATH}${CLASSPATHSEP}${CLASSPATH}"

            export CLASSPATH

        else

            CLASSPATH="${WLP_POST_CLASSPATH}"

            export CLASSPATH

        fi

    fi

     

    if [ "${POST_CLASSPATH}" != "" ] ; then

        if [ "${CLASSPATH}" != "" ] ; then

            CLASSPATH="${POST_CLASSPATH}${CLASSPATHSEP}${CLASSPATH}"

            export CLASSPATH

        else

            CLASSPATH="${POST_CLASSPATH}"

            export CLASSPATH

        fi

    fi

     

    if [ "${WEBLOGIC_CLASSPATH}" != "" ] ; then

        if [ "${CLASSPATH}" != "" ] ; then

            CLASSPATH="${WEBLOGIC_CLASSPATH}${CLASSPATHSEP}${CLASSPATH}"

            export CLASSPATH

        else

            CLASSPATH="${WEBLOGIC_CLASSPATH}"

            export CLASSPATH

        fi

    fi

     

    if [ "${PRE_CLASSPATH}" != "" ] ; then

        CLASSPATH="${PRE_CLASSPATH}${CLASSPATHSEP}${CLASSPATH}"

        export CLASSPATH

    fi

     

    if [ "${JAVA_VENDOR}" != "BEA" ] ; then

        JAVA_VM="${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}"

        export JAVA_VM

    else

        JAVA_VM="${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}"

        export JAVA_VM

    fi

     

     

    startWebLogic.sh

     

    这里没什么可以配置的。

     

    #!/bin/sh

     

    # WARNING: This file is created by the Configuration Wizard.

    # Any changes to this script may be lost when adding extensions to this configuration.

     

    # --- Start Functions ---

     

    stopAll()

    {

        # We separate the stop commands into a function so we are able to use the trap command in Unix (calling a function) to stop these services

        if [ "X${ALREADY_STOPPED}" != "X" ] ; then

            exit

        fi

        # STOP POINTBASE (only if we started it)

        if [ "${POINTBASE_FLAG}" = "true" ] ; then

            echo "Stopping PointBase server..."

            ${WL_HOME}/common/bin/stopPointBase.sh -port=${POINTBASE_PORT} -name=${POINTBASE_DBNAME} >"${DOMAIN_HOME}/pointbaseShutdown.log" 2>&1

     

            echo "PointBase server stopped."

        fi

     

        ALREADY_STOPPED="true"

        # Restore IP configuration the node manager starts IP Migration

        if [ "${SERVER_IP}" != "" ] ; then

            ${WL_HOME}/common/bin/wlsifconfig.sh -removeif "${IFNAME}" "${SERVER_IP}"

        fi

    }

     

    # --- End Functions ---

     

    # *************************************************************************

    # This script is used to start WebLogic Server for this domain.

    #

    # To create your own start script for your domain, you can initialize the

    # environment by calling @USERDOMAINHOME/setDomainEnv.

    #

    # setDomainEnv initializes or calls commEnv to initialize the following variables:

    #

    # BEA_HOME - The BEA home directory of your WebLogic installation.

    # JAVA_HOME - Location of the version of Java used to start WebLogic

    # Server.

    # JAVA_VENDOR - Vendor of the JVM (i.e. BEA, HP, IBM, Sun, etc.)

    # PATH - JDK and WebLogic directories are added to system path.

    # WEBLOGIC_CLASSPATH

    # - Classpath needed to start WebLogic Server.

    # PATCH_CLASSPATH - Classpath used for patches

    # PATCH_LIBPATH - Library path used for patches

    # PATCH_PATH - Path used for patches

    # WEBLOGIC_EXTENSION_DIRS - Extension dirs for WebLogic classpath patch

    # JAVA_VM - The java arg specifying the VM to run. (i.e.

    # - server, -hotspot, etc.)

    # USER_MEM_ARGS - The variable to override the standard memory arguments

    # passed to java.

    # PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.

    # POINTBASE_HOME - Point Base home directory.

    # POINTBASE_CLASSPATH

    # - Classpath needed to start PointBase.

    #

    # Other variables used in this script include:

    # SERVER_NAME - Name of the weblogic server.

    # JAVA_OPTIONS - Java command-line options for running the server. (These

    # will be tagged on to the end of the JAVA_VM and

    # MEM_ARGS)

    #

    # For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"

    # (http://download.oracle.com/docs/cd/E12839_01/web.1111/e13708/overview.htm).

    # *************************************************************************

     

    umask 037

     

     

    # Call setDomainEnv here.

     

    DOMAIN_HOME="/weblogic/user_projects/domains/base_domain"

     

    . ${DOMAIN_HOME}/bin/setDomainEnv.sh $*

     

    SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"

     

    SAVE_CLASSPATH="${CLASSPATH}"

     

    # Start PointBase

     

    PB_DEBUG_LEVEL="0"

     

    if [ "${POINTBASE_FLAG}" = "true" ] ; then

        ${WL_HOME}/common/bin/startPointBase.sh -port=${POINTBASE_PORT} -debug=${PB_DEBUG_LEVEL} -console=false -background=true -ini=${DOMAIN_HOME}/pointbase.ini >"${DOMAIN_HOME}/pointbase.log" 2>&1

     

    fi

     

    JAVA_OPTIONS="${SAVE_JAVA_OPTIONS}"

     

    SAVE_JAVA_OPTIONS=""

     

    CLASSPATH="${SAVE_CLASSPATH}"

     

    SAVE_CLASSPATH=""

     

    trap 'stopAll' 1 2 3 15

     

     

    if [ "${PRODUCTION_MODE}" = "true" ] ; then

        WLS_DISPLAY_MODE="Production"

    else

        WLS_DISPLAY_MODE="Development"

    fi

     

    if [ "${WLS_USER}" != "" ] ; then

        JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.username=${WLS_USER}"

    fi

     

    if [ "${WLS_PW}" != "" ] ; then

        JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.password=${WLS_PW}"

    fi

     

    if [ "${MEDREC_WEBLOGIC_CLASSPATH}" != "" ] ; then

        if [ "${CLASSPATH}" != "" ] ; then

            CLASSPATH="${CLASSPATH}${CLASSPATHSEP}${MEDREC_WEBLOGIC_CLASSPATH}"

        else

            CLASSPATH="${MEDREC_WEBLOGIC_CLASSPATH}"

        fi

    fi

     

    echo "."

     

    echo "."

     

    echo "JAVA Memory arguments: ${MEM_ARGS}"

     

    echo "."

     

    echo "WLS Start Mode=${WLS_DISPLAY_MODE}"

     

    echo "."

     

    echo "CLASSPATH=${CLASSPATH}"

     

    echo "."

     

    echo "PATH=${PATH}"

     

    echo "."

     

    echo "***************************************************"

     

    echo "* To start WebLogic Server, use a username and *"

     

    echo "* password assigned to an admin-level user. For *"

     

    echo "* server administration, use the WebLogic Server *"

     

    echo "* console at http://hostname:port/console *"

     

    echo "***************************************************"

     

    # Set up IP Migration related variables.

     

    # Set interface name.

     

    if [ "${Interface}" != "" ] ; then

        IFNAME="${Interface}"

    else

        IFNAME=""

    fi

     

    # Set IP Mask.

     

    if [ "${NetMask}" != "" ] ; then

        IPMASK="${NetMask}"

    else

        IPMASK=""

    fi

     

    # Perform IP Migration if SERVER_IP is set by node manager.

     

    if [ "${SERVER_IP}" != "" ] ; then

        ${WL_HOME}/common/bin/wlsifconfig.sh -addif "${IFNAME}" "${SERVER_IP}" "${IPMASK}"

    fi

     

    # START WEBLOGIC

     

    echo "starting weblogic with Java version:"

     

    ${JAVA_HOME}/bin/java ${JAVA_VM} -version

     

    if [ "${WLS_REDIRECT_LOG}" = "" ] ; then

        echo "Starting WLS with line:"

        echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}"

        ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}

    else

        echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"

        ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1

    fi

     

    stopAll

     

    popd

     

    # Exit this script only if we have been told to exit.

     

    if [ "${doExitFlag}" = "true" ] ; then

        exit

    fi

    转载于:https://www.cnblogs.com/xiaolang8762400/p/7384097.html

    展开全文
  • 1.首先需要在远程的weblogic的域下面,找到/bin/setDomainEnv.sh ,(例如:/app/webapp/domain/bin/setDomainEnv.sh)需要在此文件下加入如下内容: -Dcom.sun.management.jmxremote.port=1090 ##端口号可以自己...

    Weblogic远程监控

    1.首先需要在远程的weblogic的域下面,找到/bin/ setDomainEnv.sh ,(例如:/app/webapp/domain/bin/ setDomainEnv.sh)需要在此文件下加入如下内容:

    -Dcom.sun.management.jmxremote.port=1090   ##端口号可以自己指定
    -Dcom.sun.management.jmxremote.ssl=false 
    -Dcom.sun.management.jmxremote.authenticate=false
    -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder

    如图找到export JAVA_PROPERTIES这个位置,输入截图中的内容。当然端口可以自己定义,本文定义8999。

    注意图中的位置!!!

     

    oracle打印慢查询语句

    from (selcet sa.SQL_TEXT,
                sa.SQL_FULLTEXT,
                sa.EXECUTIONS as "执行次数",
                round(sa.ELAPSED_TIME/1000000,2) as "总执行时间",
                round(sa.ELAPSED_TIME/1000000/sa.EXECUTIONS,2) as "平均执行时间",
                sa.COMMAND_TYPE,
                sa.PARSING_USER_ID as "用户ID",
                u.USERNAME as "用户名",
                sa.HASH_VALUE
            from v$sqlarea sa
            left join all_users u
                on sa.PARSING_USER_ID=u.USER_ID
            where sa.EXECUTIONS >0
                and sa.PARSING_USER_ID <> '0'
            order by (sa.ELAPSED_TIME/sa.EXECUTIONS) desc
            )
        where rownum < 50;            

    连接上PLSQL,然后可以在任意一个窗口进行打印

     

    针对业务流程的性能测试(pc端录制的脚本)优化方法:

    ---把加载的静态资源放到浏览器缓存里面----

    转载于:https://www.cnblogs.com/frankruby/p/11388212.html

    展开全文
  • WebLogic的启动是通过启动文件来完成的 包括启动管理服务器(startWebLogic) 启动被管服务器(startManagedWebLogic) 设置域环境(setDomainEnv) 关闭管理服务器(stopWebLogic) 关闭被管服务器...

    WebLogic的启动是通过启动文件来完成的

    包括启动管理服务器(startWebLogic)

    启动被管服务器(startManagedWebLogic)

    设置域环境(setDomainEnv)

    关闭管理服务器(stopWebLogic)

    关闭被管服务器(stopManagedWebLogic)

    …………

    setDomainEnv.sh 文件位置:WLS_HOME\user_projects\domains\base_domain\bin 启动管理和被管服务器时的参数信息记录在此文件里。

    例如:

    设置堆内存的最小值和最大值-Xms256m,-Xmx512m设置perm区的大小-XX:PermSize=48m,-XX:MaxPermSize=128m

     

    startManagedWebLogic(启动管理服务器)

    文件位置:WLS_HOME\user_projects\domains\base_domain\bin

    nohup ./startManagedWebLogic.sh &

    &是后台启动模式,即返回命令行格式下weblogic不会停止服务。

    系统配置文件config.xml存放着域内所有的配置信息,该文件的存放位置为WLS_HOME\user_projects\domains\base_domain\config\config.xml 可以使用文本编辑器直接修改,但不建议这样做 不能在weblogic运行期间修改config.xml,因为weblogic会定期重写config.xml文件。 端口信息就保存在此文件中

     

    域日志:

    WLS_HOME\user_projects\domains\base_domain\servers\AdminServer\logs域日志记录一个Domain的运行情况,一个Domain中的各个WebLogic Server可以把它们的一些运行信息(例如严重的错误)发生给一个Domain的管理服务器上,管理服务器在把这些信息写到Domain日志中。默认名为<domain_name>.log

     

    服务器日志文件 存放位置: WLS_HOME\user_projects\domains\base_domain\servers\servername\logs 假如WebLogic Server在启动或运行过程中有错误发生,错误信息会显示在屏幕上,并且会记录在AdminServer.log文件中。该文件也会记录weblogic的启动关闭等运行信息。 可以管理控制台设置该文件的路径及名字、错误的输出的等级等。同时创建的每个被管服务器也会有一个<server_name>.log文件记录被管服务器在运行时的信息 日志文件

     

    访问日志

    存放位置:WLS_HOME\user_projects\domains\base_domain\servers\servername\logsHTTP访问日志。在WebLogic中可以对用HTTP,HTTPS协议访问服务器上的文件做记录,文件名为Access.log,HTTP访问日志的属性可以在HTTP属性页中进行设置。

    展开全文
  • 项目使用了某第三方公司...起初是修改weblogic中domain启动文件,想把jar路径set进去,但是修改了startWeblogic.sh和setDomainEnv.sh都不行,比较郁闷。后来突然想起,tomcat有个common目录,下面有个lib目录,t

    项目使用了某第三方公司提供的一个jar包,且那个jar包必须在容器启动的classpath内,不能在application的classpath内。

    起初是修改weblogic中domain的启动文件,想把jar的路径set进去,但是修改了startWeblogic.sh和setDomainEnv.sh都不行,比较郁闷。

    后来突然想起,tomcat有个common目录,下面有个lib目录,tomcat在启动的时候会自动加载lib目录下的jar,那weblogic也应该有个类似的东东才对。

    翻了翻weblogic domain的目录,发现domain下有个lib目录,里面有个说明文件这么写到:

    this is the domain library directory and is usually located at $DOMAIN_DIR/lib.

    The jars located in this directory will be picked up and added dynamically to the end of the server classpath at server startup. The jars will be ordered lexically in the classpath. The domain library directory is one mechanism that can be used for adding application libraries to the server classpath.

    It is possible to override the $DOMAIN_DIR/lib directory using the -Dweblogic.ext.dirs system property during startup. This property specifies a list of directories to pick up jars from and dynamically append to the end of the server classpath using java.io.File.pathSeparator as the delimiter between path entries.

    意思大致就是,凡是放在这个目录里的jar文件,都会在weblogic启动的时候自动追加到classpath里,可以被application引用。

    问题圆满解决,不过解决之前花了好久修改启动文件

    展开全文
  • 修改weblogic默认编码格式 到weblogicbin目录 user_projects\domains\item_domain\bin ...找到文件setDomainEnv.sh 根据下图位置添加 红色字符串:(这里将编码设置成了GBK) 设置完重启
  • Weblogic内存调整

    2019-06-30 22:33:35
    在控制台看到的JVM。 WLS_MEM_ARGS_64BIT="-Xms512m -Xmx1024m" ...方法二:找到 bea\user_projects\domains\base_domain\bin目录下的setDomainEnv.cmd文件: 找到weblogic 具体使用的jdk块:设置 MEM_ARGS和...
  • window下设置weblogic的内存大小

    千次阅读 2017-09-27 17:08:57
    1,修改weblogic所用域路径下的bin的setDomainEnv.cmd文件,如下所示: E:\wlserver\Oracle\Middleware\user_projects\domains\tpoa_test\bin\setDomainEnv.cmd 打开,并找到USER_MEM_ARGS一行,并添加set...
  • weblogic内存修改与查看

    千次阅读 2018-02-27 18:48:33
    1:进入weblogic的安装目录,通过下图的路径找到对应文件夹,然后你会看到一些脚本文件,其中以cmd结尾的是Windows系统下使用的,以sh结尾的是Linux系统下使用的。2:我们这里打开setDomainEnv.cmd文件,修改如下...
  • weblogic 一些说明

    2013-06-15 14:58:00
    版本问题WebLogic Server 版本: 10.3.1.0只支持jdk1.6, 建立动态web项目时需要选择web项目2.5, 以及编译环境选择jdk1.6 不然发布会报错更改java虚拟机内存:F:\Oracle\Middleware\user_projects\domains\base_...
  • weblogic远程调试设置步骤一、修改setDomainEnv.cmd文件二、启动weblogic三、eclipse设置 设置步骤 一、修改setDomainEnv.cmd文件 地址为 XX\user_projects\domains\域名\bin 修改内容: 添加代码段如下(位置...
  • weblogic的默认端口是7001

    万次阅读 2017-05-15 11:34:09
    weblogic的默认端口是7001,在config.xml文件中的添加   7008   位置如下: AdminServer 7008   bin/setDomainEnv.cmd call "%WL_HOME%\common\bin\commEnv.cmd"   ...
  • 在安装weblogic后有时会... 我的weblogic安装在D盘下,找到要修改域下的bin目录,我的bin目录 为D:\Oracle\Middleware\user_projects\domains\test6\bin,打开该目录下的setDomainEnv.cmd文件, 将41行和50行的路径改
  • 由于服务器是64位8G的内存,但是在服务器上安装的jdk和weblogic都是32位的,通过修改C:\Oracle\Middleware\user_projects\domains\base_domain\bin下的setDomainEnv.cmd文件,怎么也调不上去...
  • 修改weblogic根目录下user_projects\domains\域名\bin\setDomainEnv.cmd文件; 找到以下内容:if "%debugFlag%"=="true" ( set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%...
  • 成功创建Weblogic的Domain后,在user_projects\domains下就有一个domain。  下面简单说下这三个经常使用的目录: 一.bin目录  setDomainEnv.cmd:可修改或配置服务的环境信息,包括远程调试端口。  start...
  • gc日志开关 在相应domain目录下进入setDomainEnv.sh JAVA_OPTIONS="后面增加 ${JAVA_OPTIONS} -verbosegc -Xverboselog:/home...每次showdown时候(包括宕机情况),weblogic实例后就会生成gc日志文件...
  • weblogic 乱码

    2017-09-20 17:27:00
    找到bin下的setDomainEnv.cmd文件3.打开文件,从文件最后搜索第一个set JAVA_OPTIONS=%JAVA_OPTIONS%(应该是倒数第四行,空行除外),修改为set JAVA_OPTIONS=%JAVA_OPTIONS% -Dfile.encoding=utf-84.保存文件,重新启动...
  • weblogic11内存溢出解决方法解决方法:1....把setDomainEnv.cmd文件的 大概155行左右: call "%WL_HOME%\common\bin\commEnv.cmd"set WLS_HOME=%WL_HOME%\serverif "%JAVA_...
  • 我们经常在使用WebLoigc部署应用程序后,发现程序运行速度并...一、在../domain/setDomainEnv.sh文件中设置; 二、在weblogic直接设置; 转载于:https://www.cnblogs.com/nirvana-daidai/p/4925686.html...
  • Weblogic调优

    2017-07-15 17:19:00
    优化说明: 一、Weblogic服务程序设置:...修改weblogic\user_projects\domains\base_domain\bin下的setDomainEnv.cmd文件: 修改前: if"%JAVA_VENDOR%"=="Sun" ( set WLS_MEM_ARGS_64BIT=-Xms256m -Xmx512m ...
  • Weblogic控制台中文乱码处理

    千次阅读 2012-01-12 14:02:09
    2.找到bin下的setDomainEnv.cmd文件 3.打开文件,从文件最后搜索第一个set JAVA_OPTIONS=%JAVA_OPTIONS%(应该是倒数第四行,空行除外),修改为set JAVA_OPTIONS=%JAVA_OPTIONS% -Dfile.encoding=utf-8 4.保存文件,...

空空如也

空空如也

1 2 3 4 5 ... 9
收藏数 167
精华内容 66
关键字:

weblogic的setdomainenv文件