linux tomcat Deploying web application directory

启动tomcat时,一直卡在Deploying web application directory这块的解决方案

启动linux上面的tomcat后,发现日志文件一直卡在:

root@iz8vbdzx7y7owm488t4d89z bin]# tail -f ../logs/catalina.out
09-Jun-2017 15:57:06.666 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
09-Jun-2017 15:57:06.667 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
09-Jun-2017 15:57:06.667 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 535 ms
09-Jun-2017 15:57:06.684 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
09-Jun-2017 15:57:06.684 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.15
09-Jun-2017 15:57:06.690 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.0.15-server/webapps/ROOT

linux或者部分unix系统提供随机数设备是/dev/random 和/dev/urandom ,

两个有区别,urandom安全性没有random高,但random需要时间间隔生成随机数。jdk默认调用random。

然后就很简单啦,找到对应的配置文件去修改就好了

找到jdk1.x.x_xx/jre/lib/security/Java.security文件,在文件中找到securerandom.source这个设置项,将其改为:

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

修改完毕后,试了一下,ok果然非常好使。

你可能感兴趣的:(linux tomcat Deploying web application directory)