tomcat native 安装

来源:互联网 发布:淘宝网商城首页手机版 编辑:程序博客网 时间:2024/05/22 15:29
1)、安装 apr 跟 apr-util
     下载 包 http://apr.apache.org/download.cgi
     # tar zxf apr-1.5.2.tar.gz
     # cd apr-1.5.2
     修改 configure ,去除 $RM "$cfgfile" ,在30206 行
     # ./configure --prefix=/usr/local/apr
     # make && make install

     # tar zxf apr-util-1.5.4.tar.gz
     # cd apr-util-1.5.4
     # ./configure --with-apr=/usr/local/apr
     # make && make install

2)、安装 tomcat-native 
     tomcat native 在 tomcat/bin/ 下
     # tar zxf tomcat-native.tar.gz
     # cd tomcat-native-1.1.31-src
     # cd jni/native/
     # ./configure --with-apr=/usr/local/apr --with-java-home=/usr/java/jdk1.8.0_20/ --with-ssl=yes
     # make && make install

3)、配置 环境变量
     vim /etc/profile
     添加:
     export LD_LIBRARY_PATH=/usr/local/apr/lib 
   source /etc/profile

4)、重启 tomcat 
     service tomcat8080 restart
     # grep -i native catalina.out
          输出:INFO: Loaded APR based Apache Tomcat Native library 1.1.31 using APR version 1.5.2. 
0 0
原创粉丝点击