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
./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 vim /data/tomcat7-data/conf/server.xml
protocol="org.apache.coyote.http11.Http11AprProtocol"
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。