|
|
发表于 2004-4-20 02:17:57
|
显示全部楼层
请结合实际情况进行编译。
下载软件到你的安装目录,假设/opt
[root@localhost root]#cd /opt
[root@localhost opt]#tar -xzvf jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz
[root@localhost opt]#cd jakarta-tomcat-connectors-jk2-2.0.2-src
[root@localhost opt]#cd jk/native2
[root@localhost opt]#chmod +x buildconf.sh
[root@localhost opt]#./configure --with-apxs2=/apache的安装目录/bin/apxs --enable-EAPI
/*这里需要注意一下。比如我的apache安装在/opt/apache,那么我在这里要输入./configure --with-apxs2=/opt/apache/bin/apxs --enable-EAPI--enable-EAPI,请根据你的安装目录进行操作。*/
[root@localhost opt]#make
[root@localhost opt]#make install
/*到/opt/apache/modules/目录看有没有mod_jk2.so生成。如果没有请copy过去。我是直接将生成文件全部CP过去的。*.so的目录在下边*/
[root@localhost opt]#cd /opt/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2
/* 编辑jk2.properties文件。*/
# list of needed handlers.
handler.list=channelSocket,request
# Override the default port for the channelSocket
channelSocket.port=8009
/*编辑http.conf*/
#修改
DocumentRoot "/usr/local/tomcat/webapps"
#添加index.jsp
DirectoryIndex index.html index.html.var index.jsp
LoadModule jk2_module modules/mod_jk2.so
Order deny,allow
Deny from all
#
# Order deny,allow
# Deny from all
#
Order Allow,Deny
ServerName www.home.net
ServerAlias www
ServerAlias localhost
ServerAlias 192.168.0.90
ServerAdmin webmater@xxx.com
DocumentRoot /usr/local/tomcat/webapps
ErrorLog logs/home.net-errorlog
CustomLog logs/home.net-access.log common
JkUriSet worker ajp13:localhost:8009
/*编辑workers2.properties */
# only at beginnin. In production uncomment it out
[logger.apache2]
level=DEBUG
[shm]
file=/usr/local/apache/logs/shm.file
size=1048576
# 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
# Uri mapping
[uri:192.168.0.90/*.jsp]
worker=ajp13:localhost:8009
/*我就记了这么多。原文是在一个论坛上看到的。暂时没有找到。如果能够成功最好,继续关注这个贴。顺便问一下。你使用什么软件开发JSP?或者是Stauts?*/ |
|