我已經配置了幾天了,都沒有配置成功,論壇里的帖子大部分都是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" |
延伸閱讀
文章來源于領測軟件測試網 http://www.kjueaiud.com/