博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux服务器启动tomcat很慢解决方法
阅读量:4230 次
发布时间:2019-05-26

本文共 339 字,大约阅读时间需要 1 分钟。

有两种解决办法:

1)在Tomcat环境中解决

可以通过配置JRE使用非阻塞的Entropy Source。

在catalina.sh中加入这么一行:-Djava.security.egd=file:/dev/./urandom 即可。

加入后再启动Tomcat,整个启动耗时下降到Server startup in 2912 ms。

2)在JVM环境中解决

打开$JAVA_PATH/jre/lib/security/java.security这个文件,找到下面的内容:

securerandom.source=file:/dev/urandom

替换成

securerandom.source=file:/dev/./urandom
 
作者:chszs,转载需注明。博客主页:
你可能感兴趣的文章
AspectJ Cookbook
查看>>
IntelliJ IDEA in Action
查看>>
HTML Professional Projects
查看>>
Python Cookbook, Second Edition
查看>>
Java Extreme Programming Cookbook
查看>>
XSLT Cookbook
查看>>
Java Programming with Oracle JDBC
查看>>
XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application
查看>>
Java Data Access: JDBC, JNDI, and JAXP
查看>>
Using Moodle
查看>>
Concepts, Techniques, and Models of Computer Programming
查看>>
Skills for Managing Rapidly Changing It Projects
查看>>
Designing a Data Warehouse : Supporting Customer Relationship Management
查看>>
The Tomes of Delphi: Algorithms and Data Structures
查看>>
Enterprise SOA: Service-Oriented Architecture Best Practices
查看>>
JavaTech, an Introduction to Scientific and Technical Computing with Java
查看>>
Your Successful Project Management Career
查看>>
Business Process Implementation for IT Professionals and Managers
查看>>
Enterprise Java for SAP
查看>>
Taming Java Threads
查看>>