zoukankan      html  css  js  c++  java
  • java+tomcat(apr,native)

    #pdd 2014_12-24
    #安装java环境
    rpm -ivh jdk-7u72-linux-x64.rpm

    vim /etc/profile
    #set for java
    export JAVA_HOME=/usr/java/jdk1.7.0_72
    export JAVA_BIN=/usr/java/jdk1.7.0_72/bin
    export PATH=$PATH:$JAVA_HOME/bin
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

    source /etc/profile

    #测试
    java -version

    #安装tomcat
    tar -zxv -f apache-tomcat-7.0.56-src.tar.gz

    mv apache-tomcat-7.0.56-src /data/tomcat7-data

    vim /data/tomcat7-data/conf/server.xml
    maxThreads="1500" acceptCount="2000" #调整并发数

    #安装apr native
    tar -zxv -f apr-1.5.1.tar.gz

    vim configure
    # $RM "$cfgfile"(:30145)

    ./configure --prefix=/usr/local/apr
    make && make install

    tar -zxv -f apr-iconv-1.2.1.tar.gz
    ./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
    make && make install

    tar -zxv -f apr-util-1.5.4.tar.gz
    ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv
    make && make install

    tar -zxv -f tomcat-native-1.1.32-src.tar.gz

    cd tomcat-native-1.1.32-src/jni/native/

    ./configure --with-apr=/usr/local/apr --with-java-home=/usr/java/jdk1.7.0_72/
    make && make install

    vim /etc/profile
    # apr
    export LD_LIBRARY_PATH=/usr/local/apr/lib

    source /etc/profile

    vim /data/tomcat7-data/bin/catalina.sh
    if [ $have_tty -eq 1 ]; then(下一行处添加)
    CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=/usr/local/apr/lib"(add)

    vim /data/tomcat7-data/conf/server.xml
    protocol="org.apache.coyote.http11.Http11AprProtocol"

  • 相关阅读:
    POJ 3308 Paratroopers
    POJ 3228 Gold Transportation
    POJ 4786 Fibonacci Tree
    POJ 2987 Firing
    Models——英语学习小技巧之四
    Linux编程环境介绍(3) -- linux下的c/c++程序开发
    怎样使用Markdown
    windows系统中的dll的作用详细解释
    解决ListView 和ScroolView 共存 listItem.measure(0, 0) 空指针
    网页添加背景音乐
  • 原文地址:https://www.cnblogs.com/metasequoia/p/4182895.html
Copyright © 2011-2022 走看看