Tomcat7 配置 ssl

運行一個配置了ssl的項目時tomcat老是啓動不成功,報錯:「requires the APR/native library which is not available」,後來發現是找不到apr的庫。web

缺乏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).apache

網上搜索解釋:
tomcat native在具體的運行平臺上,提供了一種優化技術,它自己是基於APR(Apache Portable Runtime)技術
也就是說,咱們應用了tomcat native技術以後,tomcat在跟操做系統級別的交互方面能夠作得更好,而且它更像apache一個,能夠更好地做爲一臺web server。tomcat

下載地址:網絡

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

下載第一個,由於裏邊有咱們須要的dll文件。socket

把tcnative-1.dll文件考到jdk/bin目錄或者tomcat/bin(哪一個配置了環境變量就放哪一個裏)再運行就能夠了。這裏須要注意的是要選擇版本正確的dll文件,否則會報「Can't load IA 64-bit .dll on a AMD 64-bit platform」的錯誤,我是64位的系統就用x64文件夾裏的dll文件。ide

 

 參考:http://iceeggplant.blog.51cto.com/1446843/1218909性能

相關文章
相關標籤/搜索