Tomcat and Java Install
Tomcat and Java Install
Edit /etc/profile.d/java1.sh
Edit /etc/profile.d/java2.sh
Edit /etc/profile.d/java1.sh
#!/bin/bash
export JAVA_OPTS="
-Xms10g \
-Xmx10g \
-XX:NewRatio=1 \
-XX:SurvivorRatio=10 \
-XX:PermSize=512m \
-XX:MaxPermSize=512m"
Edit server.xml
Edit startup.sh
Place bepza.war
<Context
docBase="/data/live_Apps/bepza"
privileged="true"
reloadable="true"
crossContext="false">
</Context>
#!/bin/bash
# chkconfig: 345 91 10
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# http://www.apache.org/licenses/LICENSE-2.0
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# http://www.apache.org/licenses/LICENSE-2.0
# See the License for the specific language governing permissions and
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# http://www.apache.org/licenses/LICENSE-2.0
# See the License for the specific language governing permissions and
# http://www.oracle.com/technetwork/java/javase/downloads/index.html
#(1.2) Install the JRE according to the instructions included with the
# release.
# You may also use a full Java Development Kit (JDK) rather than just
# a JRE.
#
# http://tomcat.apache.org/
# directory.
# a) Do the full "release" build and find the created distribution in the
#Note: Do not use JAVA_OPTS to specify memory limits. You do not need much
#memory for a small process that is used to stop Tomcat. Those settings
#belong to CATALINA_OPTS.
## tomcat8
##
##
## Provides: tomcat8
## Default-Start:
## Default-Stop:
## Description: Tomcat 8
##. /etc/rc.d/init.d/functions
##
## tomcat8
##
##
## Provides: tomcat8
## Default-Start:
## Default-Stop:
## Description: Tomcat 8
##. /etc/rc.d/init.d/functions
TOMCAT_HOME=/app/tomcat1
TOMCAT_USER=root
SHUTDOWN_WAIT=20
tomcat_pid() {
start() {
pid=$(tomcat_pid)
if [ -n "$pid" ]
then
else
# Start tomcat
ulimit -n 100000
umask 007
fi
return 0
stop() {
pid=$(tomcat_pid)
if [ -n "$pid" ]
then
let kwait=$SHUTDOWN_WAIT
count=0;
sleep 1
let count=$count+1;
done
kill -9 $pid
fi
else
fi
return 0
case $1 in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
pid=$(tomcat_pid)
if [ -n "$pid" ]
then
else
fi
;;
esac
exit 0
[appuser@app1 ~]$