• tomcat7,8 centos7 配置apr极好教程


    转自:http://blog.csdn.net/remote_roamer/article/details/51719891


    第一次我自己是用的yum安装apr, apr-utils, tomcat-native,

    但是启动tomcat的时候,提示我tomcat-native版本过低,所以不得不手动安装,如下:

    1. 安装apr 1.5.2 
      下载 http://apache.fayea.com//apr/apr-1.5.2.tar.gz

      1. # cd /usr/local/src
      2. # wget http://apache.fayea.com//apr/apr-1.5.2.tar.gz
      3. # tar -xzvf apr-1.5.2.tar.gz
      4. # cd apr-1.5.2
      5. # ./configure --prefix=/usr/local/apr
      6. # make
      7. # make install
    2. 安装apr-util-1.5.4 
      下载 http://mirrors.hust.edu.cn/apache//apr/apr-util-1.5.4.tar.gz

      1. # cd /usr/local/src
      2. # wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.5.4.tar.gz
      3. # tar -xzvf apr-util-1.5.4.tar.gz
      4. # cd apr-util-1.5.4
      5. # ./configure --with-apr=/usr/local/apr
      6. # make
      7. # make install
    3. 安装 tomcat-native组件

      1. /usr/local/tomcat/bin
      2. tar -xzvf tomcat-native.tar.gz
      3. cd tomcat-native-1.2.7-src/native
      4. ./configure --with-apr=/usr/local/apr
      5. //出现如下错误
      6. //Found OPENSSL_VERSION_NUMBER 0x1000105f (OpenSSL 1.0.1e 11 Feb 2013)
      7. //Require OPENSSL_VERSION_NUMBER 0x1000200f or greater (1.0.2)
      8. //configure: error: Your version of OpenSSL is not compatible with this version of tcnative
    4. 安装OpenSSL 1.0.2 
      由于centos 7 当前的yum 库只有1.0.1 的OpenSSL,所以我们需要手工安装1.0.2

      1. # cd /usr/local/src
      2. # wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
      3. # tar -xzxf openssl-1.0.2-latest.tar.gz
      4. # cd openssl-1.0.2g
      5. # ./config --prefix=/usr/local/openssl -fPIC
      6. // 注意这里需要加入 -fPIC参数,否则后面在安装tomcat native 组件会出错
      7. // 注意:不要按照提示去运行 make depend
      8. # make
      9. # make install
      10. # mv /usr/bin/openssl ~
      11. # ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
      12. # openssl version
      13. // 确认版本信息是1.0.2
    5. 重新安装 tomcat-native组件

      1. # cd $CATALINA_HOME/bin
      2. # tar -xzvf tomcat-native.tar.gz
      3. # cd tomcat-native-1.2.7-src/native
      4. # ./configure --with-apr=/usr/local/apr --with-ssl=/usr/local/openssl
      5. # make
      6. # make install
    6. 检查是否安装成功
    1. # cd $CATALINA_HOME
    2. # cd bin
    3. # ./catalina.sh run
    4. //查看输入信息,如果有以下内容,说明安装成功
    5. //20-Jun-2016 12:28:32.859 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.7 using APR version 1.5.2.
    6. //20-Jun-2016 12:28:32.859 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
    7. //20-Jun-2016 12:28:32.862 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2g 1 Ma

  • 相关阅读:
    PLSQL Developer使用技巧整理
    PLSQL DEVELOPER 使用的一些技巧【转】 .
    MYEclipse Available Memory is low 警告 解决方法
    myeclipse安装svn插件的多种方式
    MySql的存储过程和触发器
    springmvc学习及源码地址
    spring源码下载链接
    struts2源码下载链接
    个人总结的常用java,anroid网站
    Java生成扫描可以生成手机号名片的二维码
  • 原文地址:https://www.cnblogs.com/jpfss/p/9694812.html
Copyright © 2020-2023  润新知