Ubuntu -tomcat9 更换高性能APR模式
2021/11/30 7:08:16
本文主要是介绍Ubuntu -tomcat9 更换高性能APR模式,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
- 相关软件
* apr * apr-iconv * apr-util * tomcat-native
下载地址:https://mirrors.cnnic.cn/apache/apr/
- 解压编译
tar xf apr-1.6.3.tar.gz cd apr-1.6.3/ ./configure --prefix=/usr/local/apr make && make install cd /usr/local/src wget https://mirrors.cnnic.cn/apache/apr/apr-iconv-1.2.2.tar.gz tar xf apr-iconv-1.2.2.tar.gz cd apr-iconv-1.2.2/ ./configure --with-apr=/usr/local/apr --prefix=/usr/local/apr-iconv make && make install cd /usr/local/src wget https://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.gz tar xf apr-util-1.6.1.tar.gz cd apr-util-1.6.1/ ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv make && make install cd /usr/local/tomcat/bin/ tar xf tomcat-native.tar.gz cd /usr/local/tomcat/bin/tomcat-native-1.2.16-src/native ./configure --with-apr=/usr/local/apr --with-java-home=/usr/local/jdk8.0 make && make install echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib export LD_RUN_PATH=$LD_RUN_PATH:/usr/local/apr/lib' >> /etc/profile source /etc/profile
- 修改配置(server.xml)
主要修改Connector 的protocol 属性
<Connector port="80" protocol="org.apache.coyote.http11.Http11AprProtocol" maxThreads="1000" minSpareThreads="100" acceptCount="900" disableUploadTimeout="true" connectionTimeout="20000" URIEncoding="UTF-8" enableLookups="false" redirectPort="8443" compression="on" compressionMinSize="1024" /> <!--不使用ssl就关闭否则启动会报错--> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="off" />
- 参考链接
https://cloud.tencent.com/developer/article/1401276
https://blog.csdn.net/xyang81/article/details/51502766
这篇关于Ubuntu -tomcat9 更换高性能APR模式的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-16MyBatis-Plus资料入门教程:快速上手指南
- 2024-11-16Mybatis资料入门教程:新手必看指南
- 2024-11-16MyBatis资料详解:新手入门与初级实战指南
- 2024-11-16MyBatisPlus资料:初学者入门指南与实用教程
- 2024-11-16MybatisPlus资料详解:初学者入门指南
- 2024-11-16MyBatisX资料:新手入门与初级教程
- 2024-11-16RESTful接口资料详解:新手入门指南
- 2024-11-16RESTful接口资料详解:新手入门教程
- 2024-11-16Spring Boot资料:新手入门与初级教程
- 2024-11-16Springboot资料:新手入门与初级教程