Tomcat8默认运行模式为NIO
[root@localhost ~]# tail -1 /usr/local/tomcat8/logs/catalina.out
08-Apr-2019 11:45:01.589 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
[root@localhost ~]# vim /usr/local/tomcat8/conf/server.xml
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000"
redirectPort="8443"
compression="on"
compressionMinSize="50"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain" />
[root@localhost ~]# /usr/local/tomcat8/bin/shutdown.sh
[root@localhost ~]# /usr/local/tomcat8/bin/startup.sh
[root@localhost ~]# tail -f /usr/local/tomcat8/logs/catalina.out
08-Apr-2019 11:56:02.441 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
模式三 Arp
解决重启tomcat服务后,8005端口延迟启动的问题
vi /usr/local/java/jre/lib/security/java.security
117 securerandom.source=file:/dev/urandom