`
jiayanjujyj
  • 浏览: 196670 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Tomcat7 APR 安装和配置

 
阅读更多

1. 什么是APR,APR (Apache Portable Runtime) is an open source project, which is supported by the
Apache Foundation software. The main goal of this project is to provide the
developer with an API, through which they can code and predict the identical
behavior, regardless of different platforms. It eliminates the requirement of
additional code dependency for different operating systems. For more information
on this project, please visit http://apr.apache.org/. (extract from apache tomcat 7 essentials)

 

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).

 

These features allows making Tomcat a general purpose webserver, will enable much better integration with other native web technologies, and overall make Java much more viable as a full fledged webserver platform rather than simply a backend focused technology.

 

2. 安装APR

APR项目有APR, APR-util和APR-iconv,其中APR-iconv是可选安装的。

下载最新的APR和APR-util源码包

2.1安装APR

1)解压apr-1.4.6: tar -zxf apr-1.4.6

2) cd apr-1.4.6

3)依次执行./configure

make   

sudo make install

在apr被安装到了/usr/local/apr目录下面

 

2.2 安装APR-util

1) 解压apr-util-1.4.1: tar -zxf apr-util-1.4.1

2) cd apr-util-1.4.1

3) 依次执行 ./configure --with-apr=/usr/local/apr/bin/apr-1-config  (如果不加后面的可能会报APR找不到的错误"checking for APR... no
    configure: error: APR could not be located. Please use the --with-apr option."

make

sudo make install

apr-util也被安装找/usr/local/apr下面

 

3. 进入tomcat主目录下,在bin/tomcat-native-1.1.23-src/jni/native下面依次执行:

./configure --with-apr=/usr/local/apr/bin/apr-1-config  (如果不加后面的可能会报APR找不到的错误"checking for APR... no
    configure: error: APR could not be located. Please use the --with-apr option."

make

sudo make install

 

4. 设置启动参数:

在catalina.sh 加入启动参数: CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=/usr/local/apr/lib"

 

 

分享到:
评论
1 楼 xiejx618 2012-08-31  
你安装软件的习惯都不指定安装目录的吗? 通过这tar.gz包安装的软件,刚好make uninstall不能用了(比如不小心删了),咋办呢

相关推荐

    linux下tomcat开启apr时安装包

    linux下tomcat开启apr时需要的apr安装包,请查看博客可以看到详细的配置步骤。 linux下tomcat开启apr时需要的apr安装包,请查看博客可以看到详细的配置步骤。

    apr库(tomcat优化)

    Tomcat在配置APR之后性能非常强劲。 tomcat默认采用的BIO模型,在几百并发下性能会有很严重的下降。tomcat自带还有NIO的模型,另外也可以调用APR的库来实现操作系统级别控制。 NIO模型是内置的,调用很方便,只需要...

    有关Tomcat--APR问题配置

    The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path CProgram FilesJavajdk1.6.0_04jrebin;CProgram FilesTomcat ...

    Windows下Apache2.2 + Tomcat5.5 + Apr配置备忘录

    APR所需 博文链接:https://cats-tiger.iteye.com/blog/135782

    tomcat apr工具包及安装说明

    tomcat apr模式配置需要的包,及配置说明。灰常简单。让吞吐量飞起。

    Tomcat安装与配置Native APR模式的教程

    下面这篇文中主要介绍了在 CentOS 6.5 下为 tomcat 7 安装和配置 APR 模式的步骤和过程。在安装之前,先进行简单的介绍一下相关的内容,下面来一起学习学习吧。 技术准备 什么是APR?(以下是来自维基百科的内容) ...

    tomcat APR配置所需要的全部资源

    配置tomcat Apr模式所需要的全部安装包及安装手册。 Apr即是tomcat的终极优化方案,它能大大提高你的tomcat处理静态文件的能力,极大程度上的避免 IO 问题

    tomcat的apr

    tomcat配置https后进行优化,使用apr工具进行配置,增加并发量和缩短访问时间

    tomcat启动的问题--apr

    查了一下,需要一个apr支持,然后按提示去 下载 http://tomcat.heanet.ie/native/1.1.9/binaries/win32//tcnative-1.dll 将这个文件复制到C:WINDOWSsystem32下面 或者将这个文件放到Tomcat下的bin目录下 再启动...

    apr库(tomcat优化) for native 20

    Tomcat在配置APR之后性能非常强劲。 tomcat默认采用的BIO模型,在几百并发下性能会有很严重的下降。tomcat自带还有NIO的模型,另外也可以调用APR的库来实现操作系统级别控制。 NIO模型是内置的,调用很方便,只...

    tomcat9+apr+redissession共享

    tomcat9+apr+redissession共享,相关使用资料请参考https://www.jianshu.com/p/b6d57c500aa5

    tomcat7优化版

    tomcat是经过优化配置的,下载根据自己内存大小好修改即可使用,下载后打(windows)开/bin/catalina.bat (linux)/bin/catalina.sh 下JAVA_OPTS= 后面内存参数修改即可 ;/conf/server.xml 已配置三种模式(bio/nio/...

    Apache代理tomcat群集.docx

    1. 安装配置apr和 apr-util文件 这两个开发包最好到相应apache的镜像站目录去下载。http://apache.dataguru.cn/apr/ 安装编译apache的开发包arp和apr-util,记得在安装的时候要指定路径,因为后面编译apache参数的...

    有关tomcat5.5.28的windows下的apr配置BUG,官方没有对应的tcnative-1.dll文件

    NULL 博文链接:https://coffeesweet.iteye.com/blog/648628

    tomcat集群配置所需安装文件

    apr-1.5.2.tar.gz apr-iconv-1.2.1.tar.gz apr-util-1.5.4.tar.gz httpd-2.4.18.tar.gz pcre-8.37.tar.gz pcre2-10.20.zip(可不用) tomcat-connectors-1.2.41-src.tar.gz

Global site tag (gtag.js) - Google Analytics