jdk+apache+tomcat 安装

简单记录一下安装配置
1. jdk

JAVA_HOME=/usr/local/jdk1.5.0_06
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export CLASSPATH

2. apache 及相关插件


cd srclib/apr
./configure --prefix=/usr/local/apr
make
make install

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install

./configure --prefix=/usr/local/apache \
--enable-so \
--enable-rewrite=share \
--enable-proxy=share \
--enable-proxy-ajp=share \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util
make
make install
3. tomcat
解开压缩就行了

4. 配置
(1)apache 配置:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
<VirtualHost *:8888>
    ServerAdmin [email protected]
    ServerName www.hxw.com
    JkMount /*      test    
    ErrorLog "logs/modjk.com-error_log"
    CustomLog "logs/modjk-access_log" common
</VirtualHost>
新建立一个modjk配置文件,workers.properties
worker.list=test

worker.server101.port=8009
worker.server101.host=localhost
worker.server101.type=ajp13
worker.server101.lbfactor=0
worker.server101.socket_keepalive=1
worker.server101.socket_timeout=0
worker.server101.retries=3

worker.loadbalancer.type=lb
worker.retries=3
worker.loadbalancer.balance_workers=server101
worker.loadbalancer.sticky_session=true
worker.loadbalancer.sticky_session_force=true

(2) tomcat 修改
配置此行 <Engine name="Catalina" defaultHost="localhost" jvmRoute="server101">

重新启动tomcat 与apache即可。

你可能感兴趣的:(java,apache,jdk,tomcat,socket)