jdk11没有jre目录了,tomcat安装后需要做一些修改。
JAVA_HOME=/usr/local/jdk11
JAVA_BIN=$JAVA_HOME/bin
export JAVA_BIN=$JAVA_HOME/bin
#export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
【Tomcat】Linux环境下java11与tomcat10的安装配置_L-DiCaprio的博客-CSDN博客_linuxtomcat11
linux下tomcat8安装详解(附图解步骤) - 腾讯云开发者社区-腾讯云
403error:
Tomcat8.5管理页面403 Access Denied的解决方法-蒲公英云
# USE_NOHUP (Optional) If set to the string true the start command will
# use nohup so that the Tomcat process will ignore any hangup
# signals. Default is "false" unless running on HP-UX in which
# case the default is "true"
# -----------------------------------------------------------------------------
JAVA_OPTS="-Xms1024M -Xmx2048M"
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
darwin=false
os400=false
hpux=false
case "`uname`" in
CYGWIN*) cygwin=true;;
Darwin*) darwin=true;;
OS400*) os400=true;;
HP-UX*) hpux=true;;
esac
restart tomcat
check in console:
check process don't have any change.
check by jmap tool:
[root@dft1 conf]# ps -ef |grep tomcat
root 23802 1 0 11:48 pts/0 00:00:05 /usr/local/java/jdk1.8/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat8.5/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms1024M -Xmx2048M -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat8.5/bin/bootstrap.jar:/usr/local/tomcat8.5/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat8.5 -Dcatalina.home=/usr/local/tomcat8.5 -Djava.io.tmpdir=/usr/local/tomcat8.5/temp org.apache.catalina.startup.Bootstrap start
root 24441 20762 0 12:14 pts/1 00:00:00 grep --color=auto tomcat
[root@dft1 conf]# jmap -heap 23802
Attaching to process ID 23802, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.241-b07
using thread-local object allocation.
Parallel GC with 2 thread(s)
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 2147483648 (2048.0MB)
NewSize = 357564416 (341.0MB)
MaxNewSize = 715653120 (682.5MB)
OldSize = 716177408 (683.0MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 268435456 (256.0MB)
used = 134313152 (128.09100341796875MB)
free = 134122304 (127.90899658203125MB)
50.03554821014404% used
From Space:
capacity = 44564480 (42.5MB)
used = 0 (0.0MB)
free = 44564480 (42.5MB)
0.0% used
To Space:
capacity = 44564480 (42.5MB)
used = 0 (0.0MB)
free = 44564480 (42.5MB)
0.0% used
PS Old Generation
capacity = 716177408 (683.0MB)
used = 0 (0.0MB)
free = 716177408 (683.0MB)
0.0% used
15206 interned Strings occupying 1409040 bytes.
maxThreads="300" minSpareThreads="200"/>
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />