Tomcat线程池及性能优化(重点)
只需安装Tomcat
[root@localhost ~]# vim /usr/local/tomcat8/conf/server.xml
修改处如下:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxThreads="1024" minSpareThreads="100" prestarminSpareThreads="true" />
[root@localhost ~]# netstat -anpt | grep :8080
tcp6 0 0 :::8080 :::* LISTEN 9109/java
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# iptables -F
[root@localhost ~]# /usr/local/tomcat8/bin/shutdown.sh
[root@localhost ~]# /usr/local/tomcat8/bin/startup.sh
修改前
修改后:
=========================================================================================
优化关键词:
一般在生产中可以选择自行优化,优化如下:
[root@localhost ~]# vim /usr/local/tomcat8/conf/server.xml
===============================================================================
禁用TomcatAJP连接器
禁用掉端口:
[root@localhost ~]# vim /usr/local/tomcat8/conf/server.xml
<!– <Connector port=”8009″ protocol=”AJP/1.3″ redirectPort=”8443″ />–> //注释掉这一段
2024最新激活全家桶教程,稳定运行到2099年,请移步至置顶文章:https://sigusoft.com/99576.html
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。 文章由激活谷谷主-小谷整理,转载请注明出处:https://sigusoft.com/11951.html