整合apache+tomcat
时间:2008-04-22 来源:傲枭
Normal
0
7.8 磅
0
2
false
false
false
EN-US
ZH-CN
X-NONE
MicrosoftInternetExplorer4
st1\:*{behavior:url(#ieooui) }
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:宋体;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-font-kerning:1.0pt;}
下载原文件
================================
apache_1.3.14.tar.gz
jakarta-tomcat-3.2.tar.gz
jakarta-tomcat-3.2-src.tar.gz
编译 apache
=================================
gzip -dc apache_1.3.14.tar.gz | tar xvf -
cd apache_1.3.14
./configure --prefix=/www/apache --enable-module=so --enable_rule=SHARED_CORE (允许 DSO,运行 apxs 必须)
make
make install
运行 tomcat
=================================
gzip -dc jakarta-tomcat-3.2.tar.gz | tar xvf -
mv jakarta-tomcat-3.2 tomcat
cd tomcat/bin
./startup.sh (自动生成 tomcat-apache.conf 文件)
cp tomcat-apache.conf /www/apache/conf/
生成 mod_jserv.so 文件
=================================
gzip -dc jakarta-tomcat-3.2-src.tar.gz | tar xvf -
cd jakarta-tomcat-3.2-src/src/native/apache/jserv
/www/apache/bin/apxs -c -o mod_jserv.so *.c (指定 apxs 路径)
cp mod_jserv.so /www/apache/libexec
修改 httpd.conf 和 tomcat-apache.conf
=================================
cd /www/apache/conf
vi httpd.conf
(insert line)Include conf/tomcat-apache.conf(在
httpd.conf 里增加一行)
(tomcat-apache.conf 不做任何修改)
运行 apache
=================================
cd /www/apache/bin
./apachectl start
测试结果
=================================
默认根目录为/webapps/ROOT
class默认目录为/webapps/ROOT/WEB-INF/classes
测试成功。
主要参考资料
=================================
http://www.jguru.com/jguru/faq/printablefaq.jsp?faq=Tomcat
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/uguide/tomcat_ug.html
总结
=================================
SOLARIS 下生成 mod_jserv.so 文件为难点,LINUX
下编译的不能使用。不同的APACHE,UNIX版本都不能通用。
相关阅读 更多 +
排行榜 更多 +