六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網(wǎng)中心:是一個(gè)免費(fèi)提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺(tái)!

Apache2.0.47與Tomcat4.1.27整合過(guò)程

[摘要]參考了網(wǎng)上很多資料,發(fā)現(xiàn)大都或多或少有些小問(wèn)題,現(xiàn)把我的整合過(guò)程貼出來(lái),供大家參考。一、準(zhǔn)備需要以下程序:j2sdk1.4.2_01,apache-2.0.47,jakarta-tomcat-4.1...
參考了網(wǎng)上很多資料,發(fā)現(xiàn)大都或多或少有些小問(wèn)題,現(xiàn)把我的整合過(guò)程貼出來(lái),供大家參考。

一、準(zhǔn)備

需要以下程序:
j2sdk1.4.2_01,apache-2.0.47,jakarta-tomcat-4.1.27,以及mod_jk2-2.0.43.dll
以上程序都可以在sun和apache.org下載到。
j2sdk1.4.2_01 : http://java.sun.com/j2se/1.4.2/download.html選J2SE v 1.4.2_01 的SDK
apache-2.0.47 : http://apache.linuxforum.net/dist/httpd/binaries/win32/apache_2.0.47-win32-x86-no_ssl.exe
tomcat-4.1.27 : http://apache.linuxforum.net/dist/jakarta/tomcat-4/binaries/jakarta-tomcat-4.1.27.exe
mod_jk2-2.0.43.dll : http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.2/bin/win32/mod_jk2-2.0.43.dll
注意下載的jk2文件名:mod_jk2-2.0.43.dll,而網(wǎng)上還有mod_jk-2.0.4x.dll,這是jk而不是jk2

二、安裝
假設(shè)j2sdk1.4.2_01安裝到D:\j2sdk1.4.2_01下,用[Java_install_dir]代表此路徑
apache-2.0.47安裝到D:\Program Files\Apache Group\Apache2,用[Apache_install_dir]代表此路徑,服務(wù)端口為80
jakarta-tomcat-4.1.27安裝到D:\Program Files\Apache Group\Tomcat 4.1,用[Tomcat_install_dir]代表此路徑,服務(wù)端口為8080
在系統(tǒng)環(huán)境變量里添加JAVA_HOME和TOMCAT_HOME分別為以上路徑,再修改CLASS_PATH,添加%JAVA_HOME%\lib;%TOMCAT_HOME%\bin;
安裝時(shí)把Apache和Tomcat都設(shè)置為后臺(tái)服務(wù)方式運(yùn)行。

三、配置

1. 在Apache2中安裝mod_jk2-2.0.43.dll
將mod_jk2-2.0.43.dll拷貝到[Apache_install_dir]/modules目錄中

編輯[Apache_install_dir]/conf/httpd.conf配置文件,在文件最后添加如下一行:
LoadModule jk2_module modules/mod_jk2-2.0.43.dll
2. 配置Apache端
[在Apache_install_dir]/conf目錄中新建文件workers2.properties,內(nèi)容如下:

# Define the comunication channel
[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess

# Define the parameters for the Java Virtual Machine
[vm:]
info=Parameters used to load a JVM in the server process
OPT=-Djava.class.path=[Tomcat_install_dir]\bin\tomcat-jni.jar;[Tomcat_install_dir]\bin\tomcat.jar
OPT=-Dtomcat.home=[Tomcat_install_dir]
OPT=-Dcatalina.home=[Tomcat_install_dir]
OPT=-Xmx128M

# JNI worker startup handler
[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
stdout=[Apache_install_dir]\logs\stdout.log
stderr=[Apache_install_dir]\logs\stderr.log

# JNI worker shutdown handler
[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop

# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp

#注:
#網(wǎng)上有資料OPT=-Djava.class.path是指向\lib\,實(shí)際上安裝目錄下并無(wú)\lib目錄,如不修改會(huì)出現(xiàn)java.lang.NoClassDefFoundError: org/apache/jk/apr/TomcatStarter異常
#把[Tomcat_install_dir]和[Apache_install_dir]換成實(shí)際安裝路徑,其余不用做任何改動(dòng)

3. 配置Tomcat端
修改[Tomcat_install_dir]/conf/jk2.properties,用以下內(nèi)容替換原來(lái)內(nèi)容:

# Set the desired handler list
handler.list=apr,request,container,channelJni

# Enable jni use channelJni directive
apr.jniModeSo=[Apache_install_dir]\modules\mod_jk2-2.0.43.dll

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# If you wish to start the Tomcat from inside web server then
# you don′t need any above directive. Here is shown the default
# value for the apr that you can ommit
apr.jniModeSo=inprocess

#注:
#把[Tomcat_install_dir]和[Apache_install_dir]換成實(shí)際安裝路徑,其余不用做任何改動(dòng)
#這種方式使用JNI通道,因此運(yùn)行Apache時(shí)會(huì)通過(guò)JNI直接在后臺(tái)啟動(dòng)Tomcat。

四、測(cè)試:
啟動(dòng)Apache
看http://localhost/examples/jsp/
如顯示正確內(nèi)容則整合成功!
如不成功請(qǐng)檢查[Apache_install_dir]\logs\stdout.log和[Apache_install_dir]\logs\stderr.log日志,看是什么錯(cuò)誤,根據(jù)錯(cuò)誤提示進(jìn)行修改。




主站蜘蛛池模板: 中文字幕永久在线视频 | 最近更新在线中文字幕一页 | 青娱乐国产盛宴 | 四虎精品在线观看 | 日本在线不卡一区 | 日韩特级黄色片 | 亚欧视频在线 | 欧美呦呦在线 | 天天色一色| 四虎精品成人免费影视 | 婷婷色5月 | 欧美亚洲国产精品久久久久 | 婷婷丁香激情 | 亚洲最大成人综合网 | 天堂网在线资源 | 午夜免费毛片 | 天天干成人网 | 日本系列 1页 亚洲系列 | 日韩污网站| 日韩高清在线播放不卡 | 亚洲偷偷| 亚洲欧美人妖另类激情综合区 | 日韩免费一级毛片 | 欧美一级中文字幕 | 日韩三级免费观看 | 亚欧乱色精品免费观看 | 在线看欧美成人中文字幕视频 | 亚洲图片一区 | 天天综合天天影视色香欲俱全 | 伊人网中文字幕 | 日韩中文字幕在线观看视频 | 亚洲女人国产香蕉久久精品 | 日产精品一区到六区免费 | 色欧美视频 | 亚洲综合99 | 日韩欧美三级在线 | 欧洲一区在线观看 | 最近新韩国日本免费看 | 色综合88| 色综合网址 | 日韩艳片|