<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!-- 配置线程 -->
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="500" minSpareThreads="25"
maxIdleTime="4000"
/>
三、出错情况处理 3.1、启动tomcat时报“The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/apr/lib”
解决方案:确保tomcat-native安装成功,否则执行上面2.5,如果依旧不成功,请执行下面步骤
#vi /opt/tomcat_api_8035/bin/catalina.sh
CATALINA_OPTS="-Djava.library.path=/usr/local/apr/lib" 3.2、安装apr时报‘Neither the JAVA_HOME nor the JRE_HOME environment variable is defined“ 解决方案:这是未设置环境JAVA_HOME与JAVA_JRE目录,请确保安装jdk成功,确认/etc/profile环境变量配置正确 3.3、在执行sysctl -p的时候发现输出出现以下错误 net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key error: "net.bridge.bridge-nf-call-iptables" is an unknown key error: "net.bridge.bridge-nf-call-arptables" is an unknown key kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 68719476736 kernel.shmall = 4294967296 原因:上面有3个参数依赖于bridge模块,该模块如果没有加载则会现上面的输出错误 解决方案:执行modprobe bridge命令,加载bridge模块