养生 装修 购物 美食 感冒 便秘 营销 加盟 小吃 火锅 管理 创业 搭配 减肥 培训 旅游

tomcat部署ssl出现The APR based Apache Tomcat

时间:2024-11-15 02:48:27

linux下tomcat部署ssl出现TheAPRbasedApacheTomcatNat

工具/原料

tomcat

jdk

tomcat-native

apr

方法/步骤

1、戒彬尢欤问题描述:换过tomcat版本,换过jdk版本,也换过tomcat/bin/下的tomcat-native,以及以为是ssl证书的问题。1)、启动to罪焐芡拂mcat后,查看netstat-tlnpu查看端口8443端口一直起不来。2)、查看log日志有如下错误TheAPRbasedApacheTomcatNativelibrarywhichallowsoptimalperformanceinproductionenvironmentswasnotfoundonthejava.library.path:

2、查看jdk是否安装,如未安装,请安装(我这里直接rpm包安装的)#rpm-qa|grepjdk#sudorpm-ivhjdk-**.rpm

3、查看apr是否安装(如未安装,请安装)#rpm-qa|grepapr#sudoyuminstall-yaprapr-devel

4、安装t艺皱麾酪omcat-native(在tomcat/bin/下)#sudotarzxvftomcat-native.ta鸡堕樱陨r.gz#cdtomcat-native-1.1.14-src/native#sudo./configure--with-java-home=/usr/java/jdk1.8.0_60/#sudomake#sudomakeinstall

5、设置apr的环境变量:#vi/etc/profile#追加到最后面exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib#source/etc/profile

6、附上ser箪滹埘麽ver.xml的配置截取ssl如下<Connectorport="8443"protocol=&q锇栀劐箨uot;org.apache.coyote.http11.Http11AprProtocol" maxThreads="150"SSLEnabled="true"><SSLHostConfig> <CertificateSSLCertificateFile="/home/yingjiahulian_BOS/tomcat/conf/ssl/certs/rickricks.com-cert.cer" SSLCertificateKeyFile="/home/yingjiahulian_BOS/tomcat/conf/ssl/private/rickricks.com.key" type="RSA"/> </SSLHostConfig></Connector>

© 一点知识