The APR based Apache Tomcat Native library
来源:互联网 发布:mac os 安全模式 编辑:程序博客网 时间:2024/06/07 07:43
sudo apt-get install libtcnative-1
最近使用tomcat 6.0.33这个版本,启动的时候有个提示:
The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:...
tomcat可以整合本地apr,在处理静态资源的时候速度更快,总而言之就是使用本地的apr库提升处理效率。在网上一查,很多人提到了这个问题,解决这个问题其实很简单,但window和linux处理方法不太一样。下面就分别给出解决方法。
- window平台
在window下启动的时候会提示was not found on the java.library.path: C:\Tools\jdk1.6.0_29\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS …,这个根据每个人的环境不同,可能给出的路径也不太一样,只要把Native library拷贝到上述路径之一即可,Native library是什么呢,网上有提供下载,其实不要那么麻烦,在tomcat的bin目录下就有,文件名是:tcnative-1.dll。例如我把这个文件拷贝到C:\Tools\jdk1.6.0_29\bin下,然后再启动tomcat就没有上述的提示了。
- linux平台
linux下比较复杂一点,因为tomcat包中没有提供编译好的so文件,所以需要自己编译,tomcat发行版中提供了源码,文件为tomcat的bin/tomcat-native.tar.gz,另外编译时候需要依赖APR 1.2、OpenSSL,如果机器上没有安装,可以使用 yum -y install apr-devel openssl-devel 来进行安装。解压tomcat-native.tar.gz后会得到一个tomcat-native-1.1.20-src的目录,Native library的源文件位于tomcat-native-1.1.20-src/jni/native下,进入该目录,执行./configure,可能会看到configure: error: APR could not be located. Please use the –with-apr option.的错误提示,这个时候用–with-apr制定一下apr的位置即可,我使用的是
./configure --with-apr=/usr/bin/apr-1-config
,顺利通过,然后执行 make && make install 编译就算搞定,此时应该可以在/usr/local/apr/lib/下看到一个名为 libtcnative-1.so 的文件,拷贝该文件到tomcat启动时提示的任何一个路径即可。
- The APR based Apache Tomcat Native library
- The APR based Apache Tomcat Native library
- The APR based Apache Tomcat Native library
- <TOMCAT>The APR based Apache Tomcat Native library的解决办法
- Tomcat 启动,错误:The APR based Apache Tomcat Native library
- The APR based Apache Tomcat Native library 问题
- The APR based Apache Tomcat Native library 问题
- 解决:The APR based Apache Tomcat Native library
- 关于The APR based Apache Tomcat Native library警告
- 关于The APR based Apache Tomcat Native library警告
- 解决:The APR based Apache Tomcat Native library
- eclipse 关于The APR based Apache Tomcat Native library警告
- The APR based Apache Tomcat Native library ...异常
- The APR based Apache Tomcat Native library警告
- tomcat The APR based Apache Tomcat Native library which allows ...java.library...异常
- The APR based Apache Tomcat Native library which allows ...java.library...异常
- The APR based Apache Tomcat Native library which allows ...java.library...异常
- The APR based Apache Tomcat Native library which allows ...java.library...异常
- haskell(15)
- poj2635-大进制转化+同余定理+素数筛选
- Installing CUDA Toolkit 5.0 on CentOS 6.4
- ANT简明教程
- Android 下拉刷新控件之ScrollView版本实现
- The APR based Apache Tomcat Native library
- pptp
- haskell(16)
- c++ 练习
- 如何避免面试失败(1)
- 解决Android Graphical Layout 界面效果不显示
- j ava中Integer对象和int的区别
- C语言运算符优先级和口诀助记
- jsf 中 ViewExpiredException 的处理