apache1.3 与tomcat404 能不能用jk2整合?

王朝厨房·作者佚名  2007-01-05
宽屏版  字体: |||超大  

我已经配置了几天了,都没有配置成功,论坛里的帖子大部分都是apache2 tomcat5 jk2整合的,好像和低版本的配置不太一样啊,jk2自带的文档我也照做了,mod_jk2.so已经编译成功了,但是还是整合不了。

我看文档里有:

Installing tomcat-connector in tomcat4.1

get the new connector ( I'll post the URL soon )

move mx4j-jmx.jar from server/lib to common/lib. This is not required, but allows you to use JMX. If you run tomcat in a sandbox - you can replace mx4j-jmx with jmxri-1.2, which has policy-based security.

in server/lib, replace tomcat-util.jar, tomcat-jk2.jar, tomcat-coyote.jar and tomcat-http11.jar with the new versions.

copy tomcat4-coyote.jar to server/lib. This is a new file containing the coyote adapter for tomcat4, used to be in tomcat-coyote.jar

remove bin/tomcat-jni.jar ( it is an odd file that causes several problems - if you use in-process tomcat we'll provide a different mechanism )

上面的文件是在哪里啊,是不是因为没有以上文件所以没有配置成功?

ee900 回复于:2004-12-09 20:32:34

apache与tomcat整合

ee900 于 2004年 12月06日 发表

我用的是module_jk2方式

1. 停止apache和tomcat

2.下载: http://apache.osuosl.org/jakarta/tomcat-connectors/jk2/

我下的是 jakarta-tomcat-connectors-jk2-src-current.tar.gz 是source包

3. 安装: 在/tmp中解压

tar zxvf jakarta-tomcat-connectors-jk2-src-current.tar.gz

cd ./jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2

./buildconf.sh

4. 编辑编译配置文件:

cd ..

cp ./build.properties.sample ./build.properties

vi build.properties 更改如下:

tomcat41.home=/misc/tomcat

apache2.home=/usr/local/apache

5. 配置,生成编译选项:

cd native2

./configure --with-apxs2="/usr/local/apache/bin/apxs" -enable-EAPI

6. 编译,连接,把源代码变成本地二进制码:

make

7. 移动整合插件:

cd ..

cp ./build/jk2/apache2/mod_jk2.so /usr/local/apache/modules

8. 编辑httpd.conf 改成:

LoadModule jk2_module modules/mod_jk2.so

9. 测试模块能否正常加载:

cd /usr/local/apache

./bin/apachectl configtest

如果能正常加载,会出现: Syntax OK

10. 编辑/usr/local/apache/conf/worker2.properties 如下: (2.0.49)

[shm]

info=Scoreboard. Requried for reconfiguration and status with multiprocess servers.

file=anon

# Defines a load balancer named lb. Use even if you only have one machine.

[lb:lb]

# Example socket channel, override port and host.

[channel.socket:localhost:8009]

port=8009

host=127.0.0.1

# define the worker

[ajp13:localhost:8009]

channel=channel.socket:localhost:8009

group=lb

# Map the Tomcat examples webapp to the Web server uri space

[uri:/examples/*]

group=lb

[status:]

info=Status worker, displays runtime information

[uri:/jkstatus/*]

info=The Tomcat /jkstatus handler

group=status:

11. 编辑/misc/tomcat/conf/server.xml 看是否有对8009端口的定义,如下:

port="8009" minProcessors="5" maxProcessors="75"

enableLookups="true" redirectPort="8443"

acceptCount="10" debug="0" connectionTimeout="0"

useURIValidationHack="false"

protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

12.启动服务:

先启动tomcat,再启动apache

13.测试: url "localhost" url "localhost/examples"

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有