Table of Contents |
---|
설치 준비
Playce RoRo the next 설치 파일
디렉토리 구성
디렉토리 | 설명 |
---|---|
/bin | |
/conf | |
/logs | |
/shared | |
/temp | |
/webapps | |
/temp |
환경 설정
Code Block | ||
---|---|---|
| ||
#!/bin/bash
#************************ Warning **********************************
#* *
#* This configuration is property of OPEN SOURCE CONSULTING, INC. *
#* Don't distribute this to other project. *
#* *
#* Contact jchoi@osci.kr(http://www.osci.kr) *
#*******************************************************************
# This is tomcat env.sh for iosp by Open Source Consulting, Inc
export DATE=`date +%Y%m%d_%H%M%S`
## Set Tomcat base env
export JAVA_HOME=/usr/lib/jvm/java-1.8.0
export SERVER_NAME=roro-svr
export CATALINA_HOME=/opt/apache-tomcat-8.5.57
export CATALINA_BASE=/opt/servers/$SERVER_NAME
export PORT_OFFSET=0
export COMP_USER=roro
## Set Port Configuration
#########################################
# Default Ports are as below #
# HTTP_PORT : 8080 #
# SSL_PORT : 8443 #
# SHUTDOWN_PORT : 8005 #
#########################################
export HTTP_PORT=$(expr 8080 + $PORT_OFFSET)
export AJP_PORT=$(expr 8009 + $PORT_OFFSET)
export SSL_PORT=$(expr 8443 + $PORT_OFFSET)
export SHUTDOWN_PORT=$(expr 8005 + $PORT_OFFSET)
export JMX_PORT=$(expr 8555 + $PORT_OFFSET)
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-server"
JAVA_OPTS="$JAVA_OPTS -Dserver=$SERVER_NAME"
JAVA_OPTS="$JAVA_OPTS -Dhttp.port=$HTTP_PORT"
JAVA_OPTS="$JAVA_OPTS -Dajp.port=$AJP_PORT"
JAVA_OPTS="$JAVA_OPTS -Dssl.port=$SSL_PORT"
JAVA_OPTS="$JAVA_OPTS -Dshutdown.port=$SHUTDOWN_PORT"
JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$CATALINA_HOME/lib/"
# MC Application Properties
JAVA_OPTS="$JAVA_OPTS -Dapp.name=$SERVER_NAME"
#sudo bash <<EOF
#sed -i -e '/obj_name/d' /opt/apm/scouter/agent.java/conf/mall.conf
#echo "obj_name=mall-${LOCAL_IP_END}" >> /opt/apm/scouter/agent.java/conf/mall.conf
#EOF
JAVA_OPTS="$JAVA_OPTS -noverify"
JAVA_OPTS="$JAVA_OPTS -Xms1024m"
JAVA_OPTS="$JAVA_OPTS -Xmx1024m"
JAVA_OPTS="$JAVA_OPTS -XX:MetaspaceSize=256m"
JAVA_OPTS="$JAVA_OPTS -XX:MaxMetaspaceSize=256m"
# JAVA_OPTS="$JAVA_OPTS -Xss128k"
# JAVA_OPTS="$JAVA_OPTS -verbose:gc"
JAVA_OPTS="$JAVA_OPTS -Xloggc:$CATALINA_BASE/logs/gc.log"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCDetails"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCTimeStamps"
# JAVA_OPTS="$JAVA_OPTS -XX:+PrintHeapAtGC"
JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
JAVA_OPTS="$JAVA_OPTS -XX:HeapDumpPath=$CATALINA_BASE/logs/java_${SERVER_NAME}_pid_${DATE}.hprof"
JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
JAVA_OPTS="$JAVA_OPTS -Djava.security.egd=file:/dev/urandom"
JAVA_OPTS="$JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000"
JAVA_OPTS="$JAVA_OPTS -Dsun.rmi.dgc.server.gcInterval=3600000"
JAVA_OPTS="$JAVA_OPTS -Dsun.lang.ClassLoader.allowArraySyntax=true"
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
JAVA_OPTS="$JAVA_OPTS -Djava.security.egd=file:/dev/urandom"
JAVA_OPTS="$JAVA_OPTS -Dserver.info=real"
JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Dfile.client.encoding=UTF-8"
JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=dev"
JAVA_OPTS="$JAVA_OPTS -Droro.migration.bucket.name=roro-bucket"
#JAVA_OPTS="$JAVA_OPTS -Dspring.jpa.hibernate.ddl-auto=create"
#JAVA_OPTS="$JAVA_OPTS -Droro.migration.dir.remove=false"
fi
export JAVA_OPTS
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote"
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote=true"
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT"
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
export CATALINA_OPTS
echo "================================================"
echo "CATALINA_HOME=$CATALINA_HOME"
echo "SERVER_HOME=$CATALINA_BASE"
echo "HTTP_PORT=$HTTP_PORT"
echo "SSL_PORT=$SSL_PORT"
echo "AJP_PORT=$AJP_PORT"
echo "SHUTDOWN_PORT=$SHUTDOWN_PORT"
echo "================================================" |