• 为tomcat8安装Native library


    安装依赖包

    yum install -y cmake gcc expat-devel perl wget

    安装apr

    wget http://mirrors.hust.edu.cn/apache//apr/apr-1.6.5.tar.gz
    tar zxvf apr-1.6.5.tar.gz
    cd apr-1.6.5
    vi configure (找到$RM “$cfgfile”这行删掉)
    ./configure --prefix=/usr/local/apr
    make -j
    make install

    安装apr-iconv

    wget http://mirrors.hust.edu.cn/apache//apr/apr-iconv-1.2.2.tar.gz
    tar zxvf apr-iconv-1.2.2.tar.gz
    cd apr-iconv-1.2.2
    ./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
    make -j
    make install

    安装apr-util

    wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.6.1.tar.gz
    tar zxvf apr-util-1.6.1.tar.gz
    cd apr-util-1.6.1
    ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv
    make -j
    make install

    安装openssl1.0.2

    wget https://www.openssl.org/source/openssl-1.0.2p.tar.gz
    tar zxvf openssl-1.0.2p.tar.gz
    cd openssl-1.0.2p
    ./config --prefix=/usr/local/openssl -fPIC
    make -j
    make install
    mv /usr/bin/openssl /usr/bin/openssl_old
    ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl

    安装Native

    cd /usr/local/tomcat8/bin/
    tar zxvf tomcat-native.tar.gz
    cd /usr/local/tomcat8/bin/tomcat-native-1.2.17-src/native
    ./configure --prefix=/usr/local/tomcat8/ --with-java-home=/usr/local/jdk --with-apr=/usr/local/apr/bin/apr-1-config --with-ssl=/usr/local/openssl
    make -j
    make install
    cd /usr/local/tomcat8/lib/
    cp libtcnative* /usr/lib64/
    vi /usr/local/tomcat8/conf/server.xml
    修改protocol="HTTP/1.1" 为 protocol="org.apache.coyote.http11.Http11AprProtocol"
  • 相关阅读:
    要做好性能测试,该掌握些什么?
    <form> 标签
    javascript DOM编程艺术 第10章问题记录
    简单的图片显示
    fieldset 不常用的HTML标签
    XMLHttpRequest
    单选复选框的制作
    ASP.NET MVC 中使用“RadioButtonList”和“CheckBoxList”
    Web Service 系列 → 第一个 Hello Word
    .NET平台开发实例药店系统分布式部署
  • 原文地址:https://www.cnblogs.com/kgdxpr/p/9844225.html
Copyright © 2020-2023  润新知