分享
 
 
 

Apachehttpd-2.0.47+Tomcat5.0ORtomcat-4.1.24+jk2+

王朝system·作者佚名  2008-05-18
窄屏简体版  字體: |||超大  

务器环境:

RedHat Linux 8.0

J2sdk1.4.1_02

Tomcat 4.1.24 binary OR Tomcat 5.0.12 binary

Apache 2.0.47 built from source

jk2 connector source from jakarta.apache.org

安装JDK:

下载: j2sdk-1_4_1_02-linux-i586.bin

把jdk 安装在/usr/local/j2sdk1.4.1_02

在/usr/local 下建立 软连接 jdk

#ln -s /usr/local/j2sdk1.4.1_02 /usr/local/jdk

[user@host]# cat /etc/profile.d/java.sh

# set java environment

export JAVA_HOME=/usr/local/jdk

export PATH=$PATH:$JAVA_HOME/bin

export CLASSPATH=$JAVA_HOME/lib

#更改shell文件属性:

#chmod 755 /etc/profile.d/java.sh

#查看是否正确

#which java

/usr/local/jdk/bin/java

#cd /usr/local/src/

#tar -xzvf httpd-2.0.47.tar.gz

#cd httpd-2.0.47

#配置apache 支持动态module 加载

#./configure "--with-layout=Apache" "--prefix=/usr/local/apache" "--enable-module=so" "--enable-module=setenvif" "--enable-module=rewrite" "--with-mpm=prefork"

#make

#make install

#修改http.conf 具体的修改请参考apache2.0文档

# 或者查看 http://www.cnfug.org/journal/3/02.html

<IfModule prefork.c>

StartServers 10

MinSpareServers 25

MaxSpareServers 50

ServerLimit 2000

MaxClients 1500 #Apache可以同时处理的请求

MaxRequestsPerChild 10000

</IfModule>

安装Php :

下载: php-4.3.3.tar.gz

#cd /usr/local/src

#tar -xzvf

#php for apache 以apache modules的方式运行

./configure --with-apxs2=/usr/local/apache/bin/apxs

#php run like shell 以单独的shell方式运行

./configure --prefix=/usr/local/php

#php for apache

./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-track-vars --enable-debug --enable-url-includes --enable-sockets --with-config-file-path=/usr/local/apache/conf #php.ini文件放的目录

#下面的参数是安装PHP + gd库

--with-gd=/usr/local --enable-gd-native-ttf --with-ttf=/usr/local --with-jpeg-dir=/usr/local --with-zlib-dir=/usr/local --with-png-dir=/usr/local

#make

#make install

#ls -l /usr/local/apache/modules/libphp4.so #存在 安装成功

#修改apache http.conf

添加

LoadModule php4_module modules/libphp4.so

AddType application/x-httpd-php .php

安装Tomcat:

#cd /usr/local

#tar -xzvf jakarta-tomcat-4.1.24.tar.gz

#ln -s jakarta-tomcat-4.1.24 tomcat

#测试Tomcat正常安装:

#/usr/local/tomcat/bin/startup.sh

#通过IE http://yourIP:8080/ Tomcat的页面正常显示

安装JK2 :

#cd /usr/local/src

#tar -xzvf jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz

#cd jakarta-tomcat-connectors-jk2-2.0.2-src

#cd jk/native2

#chmod 755 buildconf.sh

#./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-EAPI

#make

#make install

#如果make install 不成功需要手工发布mod_jk2.so

#cd /usr/local/src/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2

#cp *.so /usr/local/apache/modules/

配置$CATLINA/conf/server.xml

<Server port="8005" shutdown="SHUTDOWN" debug="0">

<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"

debug="0"/>

<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"

debug="0"/>

<Service name="Tomcat-Standalone">

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"

port="8080" minProcessors="5" maxProcessors="75"

enableLookups="true" redirectPort="8443"

acceptCount="100" debug="0" connectionTimeout="-1"

useURIValidationHack="false" disableUploadTimeout="true" />

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"

port="8009" minProcessors="5" maxProcessors="75"

enableLookups="true" redirectPort="8443"

acceptCount="10" debug="0" connectionTimeout="-1"

useURIValidationHack="false"

protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

<!-- An Engine represents the entry point (within Catalina) that processes

every request. The Engine implementation for Tomcat stand alone

analyzes the HTTP headers included with the request, and passes them

on to the appropriate Host (virtual host). -->

<!-- Define the top level container in our container hierarchy -->

<Engine name="Standalone" defaultHost="localhost" debug="0">

<!-- Global logger unless overridden at lower levels -->

<Logger className="org.apache.catalina.logger.FileLogger"

prefix="catalina_log." suffix=".txt"

timestamp="true"/>

<!-- Define the default virtual host -->

<Host name="localhost" debug="0" appBase="webapps"

unpackWARs="true" autoDeploy="true">

<Logger className="org.apache.catalina.logger.FileLogger"

directory="logs" prefix="localhost_log." suffix=".txt"

timestamp="true"/>

<Context path="" docBase="" debug="0"/>

</Host>

</Engine>

</Service>

</Server>

这个地方tomcat4.* 和tomcat 5.* 少有不同.

<Context path="" docBase="" debug="0"/>

对tomcat5. 可以注释掉.

编辑

#vi /usr/local/tomcat/conf/jk2.properties

# list of needed handlers.

handler.list=channelSocket,request

# Override the default port for the channelSocket

channelSocket.port=8009

#编辑文件:

#vi /usr/local/apache/conf/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

编辑http.conf

#修改

DocumentRoot "/usr/local/tomcat/webapps"

#添加index.jsp

DirectoryIndex index.html index.html.var index.jsp

LoadModule jk2_module modules/mod_jk2.so

<Directory ~ "\CVS" >

Order deny,allow

Deny from all

</Directory>

#<Directory ~ "\WEB-INF" >

# Order deny,allow

# Deny from all

#</Directory>

<Location /WEB-INF/>

Order Allow,Deny

</Location>

<VirtualHost *>

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

<Location "/*.jsp">

JkUriSet worker ajp13:localhost:8009

</Location>

</VirtualHost>

启动apache . 和tomcat

从$TOMCAT_HOME/logs/catalina.out中可以看到启动的记录.

如果通过HTTP访问到了证明你的安装成功了.

总体感觉安装TOMCAT 没有安装RESION 方便!

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有