centos6.7 tomcat8 jdk1.8java
啓動tomcat會花費10多分鐘,正常狀況下幾秒就能夠了。centos
度娘了一下是由於jdk在生成隨機數上耗時,找到jd的安裝路徑,編輯配置文件java.security把securerandom.source=file:/dev/random註釋掉,添加securerandom.source=file:/dev/urandom,以下:tomcat
/usr/java/jdk1.8.0_171-amd64/jre/lib/security/java.security #securerandom.source=file:/dev/random securerandom.source=file:/dev/urandom
重啓tomcat就能夠了。dom