tomcat启动慢解决方案

一、环境

centos6.7  tomcat8    jdk1.8

二、现象

启动tomcat会花费10多分钟,正常情况下几秒就可以了。

三、解决办法

       度娘了一下是因为jdk在生成随机数上耗时,找到jd的安装路径,编辑配置文件java.security把securerandom.source=file:/dev/random注释掉,添加securerandom.source=file:/dev/urandom,如下:

/usr/java/jdk1.8.0_171-amd64/jre/lib/security/java.security

#securerandom.source=file:/dev/random
securerandom.source=file:/dev/urandom

重启tomcat就可以了。

 

posted @ 2018-06-06 11:12  凉生墨客  阅读(287)  评论(0编辑  收藏  举报