Tomcat7 配置 ssl

运行一个配置了ssl的项目时tomcat总是启动不成功,报错:“requires the APR/native library which is not available”,后来发现是找不到apr的库。

缺少apr的支持: 
Tomcat Native 是利用 APR 来提升Tomcat性能的本地API
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。
以下是tomcat官网搜索说明:
Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. The Apache Portable Runtime is a highly portable library that is at the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT pipes and Unix sockets).

网上搜索解释:
tomcat native在具体的运行平台上,提供了一种优化技术,它本身是基于APR(Apache Portable Runtime)技术
也就是说,我们应用了tomcat native技术之后,tomcat在跟操作系统级别的交互方面可以做得更好,并且它更像apache一个,可以更好地作为一台web server。

下载地址:

http://mirrors.cnnic.cn/apache//tomcat/tomcat-connectors/native/1.1.30/binaries/

下载第一个,因为里边有我们需要的dll文件。

把tcnative-1.dll文件考到jdk/bin目录或者tomcat/bin(哪个配置了环境变量就放哪个里)再运行就可以了。这里需要注意的是要选择版本正确的dll文件,不然会报“Can't load IA 64-bit .dll on a AMD 64-bit platform”的错误,我是64位的系统就用x64文件夹里的dll文件。

 

 参考:http://iceeggplant.blog.51cto.com/1446843/1218909

转载于:https://www.cnblogs.com/suiblog/p/3668171.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值