카테고리 없음

JBoss AS 7 (env.sh 스크립트)

알 수 없는 사용자 2014. 9. 30. 23:57

JBoss AS 7의 관리를 위한  env.sh 스크립트 공람합니다.

----------------------------------------------------------------------------

#!/bin/sh


DATE=`date +%Y%m%d%H%M%S`


##### JBOSS Directory Setup #####

export JBOSS_HOME=/jboss/jboss-as-7.1.1.Final

export DOMAIN_BASE=/jboss/domains

export SERVER_NAME=server11

export JBOSS_LOG_DIR=/jb_log/${SERVER_NAME}

export EXTERNAL_DEPLOYMENT=/jboss/applications


##### Configration File #####

export CONFIG_FILE=standalone-ha.xml

export HOST_NAME=mwtest

export NODE_NAME=$SERVER_NAME

export PORT_OFFSET=0

export JBOSS_USER=jboss


##### Bind Address #####

export BIND_ADDR=0.0.0.0


export MULTICAST_ADDR=230.1.0.1

export JMS_MULTICAST_ADDR=231.7.0.1

export MODCLUSTER_MULTICAST_ADDR=224.0.1.105

export MGMT_ADDR=localhost

export CONTROLLER_IP=$MGMT_ADDR

let CONTROLLER_PORT=9999+$PORT_OFFSET

export CONTROLLER_PORT

export LAUNCH_JBOSS_IN_BACKGROUND=true


##### JBoss System module and User module directory #####

export JBOSS_MODULEPATH=$JBOSS_HOME/modules:$JBOSS_HOME/modules.ext


# JVM Options : Server

export JAVA_OPTS="-server $JAVA_OPTS"


# JVM Options : Memory

export JAVA_OPTS=" $JAVA_OPTS -Xms64m -Xmx512m -XX:MaxPermSize=256m"


export JAVA_OPTS=" $JAVA_OPTS -XX:+PrintGCTimeStamps "

export JAVA_OPTS=" $JAVA_OPTS -XX:+PrintGCDetails "

export JAVA_OPTS=" $JAVA_OPTS -Xloggc:$JBOSS_LOG_DIR/gc/gc_$SERVER_NAME.log "

export JAVA_OPTS=" $JAVA_OPTS -XX:+UseParallelGC "

export JAVA_OPTS=" $JAVA_OPTS -XX:+ExplicitGCInvokesConcurrent "

export JAVA_OPTS=" $JAVA_OPTS -XX:-HeapDumpOnOutOfMemoryError "


# Linux Large Page Setting

export JAVA_OPTS=" $JAVA_OPTS -Djava.net.preferIPv4Stack=true"

export JAVA_OPTS=" $JAVA_OPTS -Dorg.jboss.resolver.warning=true"

export JAVA_OPTS=" $JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000 "

export JAVA_OPTS=" $JAVA_OPTS -Dsun.rmi.dgc.server.gcInterval=3600000"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.byteman"

export JAVA_OPTS=" $JAVA_OPTS -Djava.awt.headless=true"


#for darwin

export JBOSS_BASE_DIR="$DOMAIN_BASE/$SERVER_HOME"


export JAVA_OPTS=" $JAVA_OPTS -Djboss.server.base.dir=$DOMAIN_BASE/$SERVER_NAME/standalone"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.server.log.dir=$JBOSS_LOG_DIR"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.external.deployments=$EXTERNAL_DEPLOYMENT"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.socket.binding.port-offset=$PORT_OFFSET"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.node.name=$NODE_NAME"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.bind.address.management=$MGMT_ADDR"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.bind.address=$BIND_ADDR"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.default.multicast.address=$MULTICAST_ADDR"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.messaging.group.address=$JMS_MULTICAST_ADDR"

export JAVA_OPTS=" $JAVA_OPTS -Djboss.modcluster.multicast.address=$MODCLUSTER_MULTICAST_ADDR"


export JAVA_OPTS=" $JAVA_OPTS -Dserver.mode=local"


# Use log4j in application

export JAVA_OPTS=" $JAVA_OPTS -Dorg.jboss.as.logging.per-deployment=false "


echo "================================================"

echo "JBOSS_HOME=$JBOSS_HOME"

echo "DOMAIN_BASE=$DOMAIN_BASE"

echo "SERVER_NAME=$SERVER_NAME"

echo "CONFIG_FILE=$CONFIG_FILE"

echo "BIND_ADDR=$BIND_ADDR"

echo "PORT_OFFSET=$PORT_OFFSET"

echo "MULTICAST_ADDR=$MULTICAST_ADDR"

echo "CONTROLLER=$CONTROLLER_IP:$CONTROLLER_PORT"

echo "================================================"


by hyeons(9월)