Date Created: Tue 15-Mar-2011

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/



    Generating a WebSphere start server script

    Normally when you start Websphere using the startServer.sh or startServer.bat screen you need to pass the server name. You can also get the startServer script to automatically generate a script specific for a given server.


    ./startServer.sh server01 -script server01.sh -background
    ADMU0116I: Tool information is being logged in file
    /var/apps/was8/profiles/appsrv01/logs/server01/startServer.log
    ADMU0128I: Starting tool with the appsrv01 profile
    ADMU3100I: Reading configuration for server: server01
    ADMU3300I: Launch script for server created: server01.sh

    This script can then be placed anywhere on your path no longer requiring you reference the <was_root>/<profile_root>bin folder to use the startServer.sh script.


    An example of a generated script

    #!/bin/sh
    # server01.sh
    # Generated: Tue Mar 15 15:27:57 GMT 2011

    # Bootstrap values ...
    binDir=/var/apps/was8/profiles/appsrv01/bin
    . $binDir/setupCmdLine.sh

    # For debugging the server process:
    # export DEBUG="-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"

    # Environment Settings
    PLATFORM=`/bin/uname`
    case $PLATFORM in
    AIX)
    EXTSHM=ON
    D_ARGS=""$D_ARGS" $DELIM -Dibm.websphere.preload.classes=true"
    LIBPATH="$WAS_LIBPATH":$LIBPATH
    export LIBPATH EXTSHM ;;
    Linux)
    LD_LIBRARY_PATH="$WAS_LIBPATH":$LD_LIBRARY_PATH
    D_ARGS=""$D_ARGS" $DELIM -Dibm.websphere.preload.classes=true"
    export LD_LIBRARY_PATH ;;
    SunOS)
    LD_LIBRARY_PATH="$WAS_LIBPATH":$LD_LIBRARY_PATH
    D_ARGS=""$D_ARGS" $DELIM -Dibm.websphere.preload.classes=true"
    export LD_LIBRARY_PATH ;;
    HP-UX)
    SHLIB_PATH="$WAS_LIBPATH":$SHLIB_PATH
    D_ARGS=""$D_ARGS" $DELIM -Dibm.websphere.preload.classes=true"
    export SHLIB_PATH ;;
    OS/390)
    PATH="$PATH":$binDir
    export PATH
    D_ARGS=""$D_ARGS" $DELIM -Dfile.encoding=ISO8859-1 $DELIM -Djava.ext.dirs="$JAVA_EXT_DIRS""
    D_ARGS=""$D_ARGS" $DELIM -Dwas.serverstart.cell="$WAS_CELL""
    D_ARGS=""$D_ARGS" $DELIM -Dwas.serverstart.node="$WAS_NODE""
    D_ARGS=""$D_ARGS" $DELIM -Dwas.serverstart.server="$1""
    X_ARGS="-Xnoargsconversion" ;;
    esac



    # Launch Command
    exec "/var/apps/was8/java/bin/java" $DEBUG "-Declipse.security" "-Dosgi.install.area=/var/apps/was8" "-Dosgi.configuration.area=/var/apps/was8/profiles/appsrv01/configuration" "-Djava.awt.headless=true" "-Dosgi.framework.extensions=com.ibm.cds,com.ibm.ws.eclipse.adaptors" "-Xshareclasses:name=webspherev70_%g,groupAccess,nonFatal" "-Xscmx50M" "-Xbootclasspath/p:/var/apps/was8/java/jre/lib/ext/ibmorb.jar:/var/apps/was8/java/jre/lib/ext/ibmext.jar" "-classpath" "/var/apps/was8/profiles/appsrv01/properties:/var/apps/was8/properties:/var/apps/was8/lib/startup.jar:/var/apps/was8/lib/bootstrap.jar:/var/apps/was8/lib/jsf-nls.jar:/var/apps/was8/lib/lmproxy.jar:/var/apps/was8/lib/urlprotocols.jar:/var/apps/was8/deploytool/itp/batchboot.jar:/var/apps/was8/deploytool/itp/batch2.jar:/var/apps/was8/java/lib/tools.jar" "-Dibm.websphere.internalClassAccessMode=allow" "-verbose:gc" "-Xms256m" "-Xmx512m" "-Xcompressedrefs" "-Xquickstart" "-Xverify:none" "-Dws.ext.dirs=/var/apps/was8/java/lib:/var/apps/was8/profiles/appsrv01/classes:/var/apps/was8/classes:/var/apps/was8/lib:/var/apps/was8/installedChannels:/var/apps/was8/lib/ext:/var/apps/was8/web/help:/var/apps/was8/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime" "-Dderby.system.home=/var/apps/was8/derby" "-Dcom.ibm.itp.location=/var/apps/was8/bin" "-Djava.util.logging.configureByServer=true" "-Duser.install.root=/var/apps/was8/profiles/appsrv01" "-Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder" "-Dpython.cachedir=/var/apps/was8/profiles/appsrv01/temp/cachedir" "-Dwas.install.root=/var/apps/was8" "-Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager" "-Dserver.root=/var/apps/was8/profiles/appsrv01" "-Dcom.ibm.security.jgss.debug=off" "-Dcom.ibm.security.krb5.Krb5Debug=off" "-Xtrace:none" "-Dcom.ibm.xml.xlxp.jaxb.opti.level=3" "-Djava.endorsed.dirs=/var/apps/was8/endorsed_apis:/var/apps/was8/java/jre/lib/endorsed:/var/apps/was8/endorsed_apis:/var/apps/was8/java/jre/lib/endorsed" "-Djava.security.auth.login.config=/var/apps/was8/profiles/appsrv01/properties/wsjaas.conf" "-Djava.security.policy=/var/apps/was8/profiles/appsrv01/properties/server.policy" "com.ibm.wsspi.bootstrap.WSPreLauncher" "-nosplash" "-application" "com.ibm.ws.bootstrap.WSLauncher" "com.ibm.ws.runtime.WsServer" "/var/apps/was8/profiles/appsrv01/config" "s15418557Node01Cell" "node01" "server01" &

    Unfortunately the -script option for the startServer.sh script has downsides. There will be no native_stdout or native_stderr files for the JVM and java core dumps will be written to / rather than <was profile root>.

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories