CentOS环境下tomcat启动超级慢的解决方案

前端之家收集整理的这篇文章主要介绍了CentOS环境下tomcat启动超级慢的解决方案前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

tomcat日志中的其中一行:
Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [341,502] milliseconds

总启动时间:

INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 05,2017 12:11:35 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 05,2017 12:11:35 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 366680 ms

打开$JAVA_PATH/jre/lib/security/java.security这个文件,找到下面的内容
securerandom.source=file:/dev/urandom
替换成
securerandom.source=file:/dev/./urandom

参考文章:
https://yq.aliyun.com/articles/78917
https://yq.aliyun.com/articles/106290
https://yq.aliyun.com/ask/20703

原文链接:https://www.f2er.com/centos/376393.html

猜你在找的CentOS相关文章