Jeffrey’s Blog

AS4+apache+tomcat完整安装笔记

Filed under: 应用服务 — Jeffrey @ Thursday, March 30th, 2006 11:57 pm 1,571 views   Print This Post  

作者: Jeffrey
出处:http://blog.zhangjianfeng.com/?p=164

1.下载apache、Tomcat、JK2、JDK1.50_04,并统一拷贝到/www
2.编绎apache
(1).tar xvzf ….
(2).cd ht….
(3)./configure –prefix=/web/apache –enable-mods-shared=all –enable-so
(4)make;make install
3.安装JDK
(1)cp jdk-1_5_0-04-Linux-i586-1.bin /web
(2)cd /web
(3)chmod 711 jdk-1_5_0-04-Linux-i586-1.bin
(4)./jdk-1_5_0-04-Linux-i586-1.bin
4.安装TOMCAT
(1)tar ….
(2)mv … /web/tomcat
(3)vi /web/tomcat/conf/tomcat-users.xml
添加
<role rolename=”manager”/>
<role rolename=”admin”/>
<user username=”root” password=”1111111″ roles=”admin,manager”/>
#添加web重启帐号root , url=http://ip:8080/manager/html
(4)添加j2sdk路径
vi ./bin/setclasspath.sh
在文件第一行添加
JAVA_HOME=/usr/java/j2sdk1.4.2_08
export JAVA_HOME

(5)/web/tomcat/bin/startup.sh start
5.整合apache+tomcat
(1)tar ….
(2)cd ja…./jk/native2
(3)#./configure –with-apxs2=/web/apache/bin/apxs –enable-EAPI
(4)make;make install
注:如果make install不成功需要手工发布mod_jk2.so
cp /www/ja…../jk/build/jk2/apache2/*.so /web/apache/modules/
6.修改httpd.conf (vi …)
在LoadModule后添加一行,LoadModule jk2_module modules/mod_jk2.so
7.在apache/conf/中新建文件workers2.properties(vi /web/apache/conf/w…)

QUOTE:

[shm]
file=/web/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:/*]
worker=ajp13:localhost:8009

 

8.启动服务
(1)/web/tomcat/bin/shutdown.sh stop
(2)/web/tomcat/bin/startup.sh start
(3)/web/apache/bin/apachectl restart
9.测试
http://IP,出现变态猫画面.至此apache+tomcat整合完成:)

附: 后更新的apache2.2.8+tomcat6.0.16配置文件 tomcat-apache-configtar.gz

给本文打分: 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

京ICP备06038449号