tomcat native-apr Library 사용으로 컴파일 하기
APR - 자바 포터블 런타임...
tomcat 을 webserver 로 활용하기 위해서는 강력히 추천 되는 기능 입니다. 아래 6.0 매뉴얼에서 발췌한 부분을 보더라도,
파일처리 및 SSL 처러, 메모리 관리에 기능향상이 있다고 합니다.
이런점은 java 가 virtual machine 으로 구동되는 한계를 극복한다고 봐야죠...
http://tomcat.apache.org/tomcat-6.0-doc/apr.html
Introduction |
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.
|
1) apache apr install
cd work
cp /download/apr-1.4.6/apr-1.4.6.tar.gz .
tar xvzf *
cd apr-1.4.6
./configure
make
make install
DEFAULT APR PATH : /usr/local/apr
2) tomcat-apr native lib install
- my tomcat location : /home/app/homewas
[aroma@ADMWAS02 tomcat-native-1.1.22-src]$ pwd
/home/app/homewas/bin/tomcat-native-1.1.22-src
[aroma@ADMWAS02 tomcat-native-1.1.22-src]$ cd /home/app/homewas/bin/tomcat-native-1.1.22-src/jni/native
[root@ADMWAS02 native]./configure --prefix=/home/app/homewas --with-apr=/usr/local/apr/bin/apr-1-config --with-java-home=$JAVA_HOME
[root@ADMWAS02 native]# make
root@ADMWAS02 native]# pwd
/home/app/homewas/bin/tomcat-native-1.1.22-src/jni/native
[root@ADMWAS02 native]# make install
EDIT tomcat bin/startup.sh
export LD_LIBRARY_PATH=/home/app/homewas/lib <------------ ADD This LINE
export CATALINA_HOME=/home/app/homewas
------------
결과적으로 아래와 같이 파란색으로 구분된 파일이 생성 된다.
root@ADMWAS02 lib]# pwd
/home/app/homewas/lib
[root@ADMWAS02 lib]# ls -tlr
??? 8344
-rw-r-xr-- 1 staff user 23047 2?? 6 22:39 tomcat-util.jar
-rw-r-xr-- 1 staff user 115293 2?? 6 22:39 tomcat-jdbc.jar
-rw-r-xr-- 1 staff user 52114 2?? 6 22:39 tomcat-i18n-ja.jar
-rw-r-xr-- 1 staff user 48690 2?? 6 22:39 tomcat-i18n-fr.jar
-rw-r-xr-- 1 staff user 76658 2?? 6 22:39 tomcat-i18n-es.jar
-rw-r-xr-- 1 staff user 235173 2?? 6 22:39 tomcat-dbcp.jar
-rw-r-xr-- 1 staff user 742688 2?? 6 22:39 tomcat-coyote.jar
-rw-r-xr-- 1 staff user 6869 2?? 6 22:39 tomcat-api.jar
-rw-r-xr-- 1 staff user 176837 2?? 6 22:39 servlet-api.jar
-rw-r-xr-- 1 staff user 88688 2?? 6 22:39 jsp-api.jar
-rw-r-xr-- 1 staff user 590854 2?? 6 22:39 jasper.jar
-rw-r-xr-- 1 staff user 122630 2?? 6 22:39 jasper-el.jar
-rw-r-xr-- 1 staff user 43488 2?? 6 22:39 el-api.jar
-rw-r-xr-- 1 staff user 1708951 2?? 6 22:39 ecj-3.7.jar
-rw-r-xr-- 1 staff user 1489720 2?? 6 22:39 catalina.jar
-rw-r-xr-- 1 staff user 253692 2?? 6 22:39 catalina-tribes.jar
-rw-r-xr-- 1 staff user 130967 2?? 6 22:39 catalina-ha.jar
-rw-r-xr-- 1 staff user 54684 2?? 6 22:39 catalina-ant.jar
-rw-r-xr-- 1 staff user 15261 2?? 6 22:39 annotations-api.jar
drwxr-xr-x 2 root root 4096 3?? 19 18:25 pkgconfig
-rwxr-xr-x 1 root root 881602 3?? 19 18:25 libtcnative-1.so.0.1.22
lrwxrwxrwx 1 root root 23 3?? 19 18:25 libtcnative-1.so.0 -> libtcnative-1.so.0.1.22
lrwxrwxrwx 1 root root 23 3?? 19 18:25 libtcnative-1.so -> libtcnative-1.so.0.1.22
-rwxr-xr-x 1 root root 924 3?? 19 18:25 libtcnative-1.la
-rw-r--r-- 1 root root 1573424 3?? 19 18:25 libtcnative-1.a
[root@ADMWAS02 lib]#
OK , tomcat restart
아래는 참조 사이트 와 그내용 입니다.
http://www.gurubee.net/pages/viewpage.action?pageId=3902222