APR installation
来源:互联网 发布:大学专科本科网络教育 编辑:程序博客网 时间:2024/05/18 01:34
Build tc-native requires three components to be installed:
- APR librrary
- OpenSSL libraries
- Java SE Development Kit (JDK)
Step 1: Install apr Dev Env:
Run command "yum list apr-devel", if not including apr-devel.i386/apr-devel.x86_64m, then install it. In rpm based Linux those dependencies could be installed by something like:
yum install apr-devel openssl-devel
By this time, you should be able to see: /usr/bin/apr-1-config, which will be used for following steps.
yum install wget
Step 3: Download tomcat-native package
wget http://mirror.bjtu.edu.cn/apache//tomcat/tomcat-connectors/native/1.1.22/source/tomcat-native-1.1.22-src.tar.gz
Step 4: Uncompress this file
tar -zxvf tomcat-native-1.1.22-src.tar.gz
Step 5: Drill down to the compile path
cd tomcat-native-1.1.22-src/jni/native
Step 6: Build tc-native.
Read the description of all the parameters:
./configure --help
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-apr=$HOME/APR prefix for installed APR or the full path to apr-config
--with-java-home=$JAVA_HOME Location of JDK directory.
--with-java-platform=2 Force the Java platform (value is 1 for 1.1.x or 2 for 1.2.x or greater)
--with-os-type=SUBDIR Location of JDK os-type subdirectory.
--with-ssl=HOME/OPENSSL Build with OpenSSL yes|no|path
Installation directories:
--prefix=$CATALINA_HOME install architecture-independent files in PREFIX [/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX]
to create the includes and makefiles to be able to build tc-native.
Where:
$HOME/APR is something like /usr/bin/apr-1-config or the path where apr is installed.
$JAVA_HOME is something /home/jfclere/JAVA/jdk1.5.0_09 path to a JDK installation. Any JDK should work but it is advisable to use the same JVM version the JVM you use with Tomcat.
$HOME/OPENSSL is the path where OpenSSL is installed.
$CATALINA_HOME is the path where the produced libraries will be installed. Something like $HOME/apache-tomcat-6.0.16/
./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/data/jre --with-ssl=yes --prefix=/data/apr
make && make install
Libraires will be installed in /data/apr/lib.
Step 7:
Add path to the tc-native to LD_LIBRARY_PATH and export it in you starting script.
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/apr/lib
export LD_LIBRARY_PATH
Step 8:
Copy tomcat-apr-5.5.23.jar to the class path of you application.
Step 9: update your source code:
IoAcceptor acceptor = new AprSocketAcceptor;
- APR installation
- apr
- APR
- 编译apr
- apr简介
- APR介绍
- Apache apr
- APR介绍
- Tomcat APR
- APR AJP
- apr多线程
- APR简介
- TOMCAT APR
- APR介绍
- APR 简介
- apr相关
- APR 池
- About APR
- gentoo hardened emerge报 setexec(con)错误
- (Linux多线程编程(不限Linux))多线程操作
- 如何避免表单重复提交
- 二叉树相关操作(遍历、路径、最近公共父节点、重构)
- Ubuntu 字符界面标准安装图解
- APR installation
- 云中的高可用
- Linux下的多线程编程
- document.getElementById获取不到值的几种原因分析
- JS 语法: document.getElementById没有括号
- CCTV与西方媒体的区别!句句发人深思
- Log4j 日志管理
- Avado:你的个人健康管理专家
- 更新xorg-server后出现的问题解决办法