NIO
[root@localhost ~]# vim /usr/local/tomcat9/conf/server.xml
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000"
redirectPort="8443"
compression="on"
compressionMinSize="50"
noCompressionUserAgents="gozilla,traviata"
compressableMimeType="test/html,text/xml.text/javascript,text/css,text/plain" />
[root@localhost ~]# /usr/local/tomcat9/bin/shutdown.sh
[root@localhost ~]# /usr/local/tomcat9/bin/startup.sh
[root@localhost ~]# tail -f /usr/local/tomcat9/logs/catalina.out
23-Sep-2019 09:06:46.472 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"]
23-Sep-2019 09:06:46.517 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["ajp-nio-8009"]
23-Sep-2019 09:06:46.523 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in [1,864] milliseconds
APR
[root@localhost ~]# yum -y install apr apr-devel
[root@localhost ~]# cp /usr/local/tomcat9/bin/tomcat-native.tar.gz ./
[root@localhost ~]# tar fx tomcat-native.tar.gz
[root@localhost ~]# cd tomcat-native-1.2.19-src/native/
[root@localhost native]# ./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/usr/local/java/ && make && make install
[root@localhost native]# vim /usr/local/tomcat9/bin/catalina.sh
CATALINA_OPTS="-Djava.library.path=/usr/local/apr/lib"
[root@localhost native]# vim /usr/local/tomcat9/conf/server.xml
<Connector port="8080" protocol="org.apache.coyote.http11.Http11AprProtocol"
[root@localhost native]# /usr/local/tomcat9/bin/shutdown.sh
[root@localhost native]# /usr/local/tomcat9/bin/startup.sh
[root@localhost ~]# tail -f /usr/local/tomcat9/logs/catalina.out
23-Sep-2019 09:20:57.087 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-apr-8080"]
23-Sep-2019 09:20:57.113 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["ajp-nio-8009"]
23-Sep-2019 09:20:57.123 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in [2,422] milliseconds
相关文章
- 07-16003-tomcat配置文件-server、tomcat-users
- 07-16Tomcat漏洞升级
- 07-16Get提交数据过大,tomcat报错,信息: Error parsing HTTP request header Note: further occurrences of HTTP header p
- 07-16org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException: The field xxx
- 07-16Tomcat 服务器介绍和使用,Myeclipse 的安装,Eclipse配置Tomcat
- 07-16MyEclipse配置Tomcat
- 07-16MyEclipse导入现成项目后报Target runtime Apache Tomcat v6.0 is not defined. 错误的解决办法...
- 07-16Could not load the Tomcat server configuration at \Servers\MyEclipse Tomcat v8.5-config.???
- 07-16Myeclipse配置tomcat和jdk
- 07-16在 MyEclipse 中配置 Tomcat