Tomcat 5.0 + Apache 2.0 is fully installed

xiaoxiao2021-03-06  42

Apache httpd-2.0.47 Tomcat jakarta-tomcat-4.1.24 jk2 php-4.3.3 installation: Server Environment: RedHat Linux 8.0J2sdk1.4.1_02Tomcat 4.1.12 binaryApache 2.0.47 built from sourcejk2 connector source from jakarta .apache.org installation JDK: Download: J2SDK-1_4_1_02-linux-i586.bin Install JDK installed in /usr/local/j2sdk1.4.1_02 Create soft connection JDK # ln -s / usr / local / J2SDK1.4.1_02 / usr / local / jdk [user @ host] # cat /etc/profile.d/java.sh# set java environmentexport java_home = / usr / local / jdkexport path = $ path: $ java_home / binExport classpath = $ Java_home / lib # Change shell file attribute: #CHMOD 755 /etc/profile.d/java.sh# View Whether correct #Which Java / usr / local / jdk / bin / java installation Apache: #CD / USR / local / SRC / # tar -xzvf httpd-2.0.47.tar.gz # cd httpd-2.0.47 # Configure Apache Support Dynamic Module Load #. / configure "- with-layout = apache" - prefix = / usr / Local / Apache "" - enable-module = so "" - enable-module = setENVIF "- enable-module = shutrite" "- with-mpm = prefork" # make # make install # modified http.conf For specific modifications, please refer to Apache2.0 Document # or view http://www.cnfug.org/journal/3/02.html

STARTSERVERS 10

MinSpareServers 25

MaxSpareServers 50

ServerLimit 2000

MaxClients 1500 #apache can handle the request at the same time

MaxRequestsperChild 10000

Install PHP: Download: PHP-4.3.3.tar.gz # cd / usr / local / src # tar -xzvf # php for Apache runs in apache mode ./configure --with-apxs2 = / usr / local / Apache / bin / apxs # PHP Run Like Shell runs in a separate shell ./configure --prefix = / usr / local / php # php for apache./configure--with-apxs2=/usr/local/apache/bin / apxs - enable-track-vars - enable-debug - enable-url-incdude - enable-sockets - with-config-file-path = / usr / local / apache / conf # php.ini file release Directory # The following parameters are installed on the installation of PHP GD library --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 # exist Install success # Modify apache http.conf Add loadModule PHP4_Module Modules / libphp4.soaddtype application / x-httpd-php .php installation Tomcat: #CD / usr / local # tar -xzvf jakarta-tomcat-4.1.24.tar.gz # Ln -s jakarta-tomcat-4.1.24 Tomcat # Test Tomcat Normal installation: # / usr / local / tomcat / bin / startup.sh # via IE http: // Yourip: 8080 / Tomcat page Normally installation 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 # If make install is unsuccessful, you need to post 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 / configuration $ CATLINA / conf / server.xmldebug = "0" />

Debug = "0" />

Port = "8080" MINPROCESSORS = "5" maxprocessors = "75"

Enablelookups = "True" redirectport = "8443"

AcceptCount = "100" debug = "0" connectionTIMEOUT = "- 1"

Useurivalidationhack = "false" disableuploadtimeout = "true" /> port = "8009" minprocessors = "5" maxprocessors = "75"

Enablelookups = "True" redirectport = "8443"

Acceptcount = "10" debug = "0" connectionTIMEOUT = "- 1"

Useurivalidationhack = "false"

ProtocolHandlerclassName = "org.apache.jk.server.jkcoyotehandler" />

Prefix = "Catalina_Log." SUFFIX = ". TXT"

TimeStamp = "true" />

Unpackwars = "true" autodeploy = "true">

Directory = "Logs" prefix = "localhost_log." suffix = ". txt"

TimeStamp = "true" />

# Edit #vi /usr/local/tomcat/conf/jk2.properties# list of needed handlers.handler.list = channelSocket, request # Override the default port for the channelSocketchannelSocket.port = 8009 # Edit the file: #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.filesize = 1048576 # Example socket channel Override port and host. [Channel. Socket: localhost: 8009] Port = 8009Host = 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 [URI: 211.167.83.165 / *. Jsp] worker = ajp13: localhost: 8009 # Edit http.conf # Modify DocumentRoot "/ usr / local / tomcat / webapps" # Add index.jspdirectoryindex index.html index.html.var index.jsploadModule JK2_Module Modules / Mod_jk2.so

ORDER DENY, ALOW

Deny from all

#

# Order deny, allow

# Deny from all

#

ORDER ALOW, DENY

Servername www.home.net

Serveralias WWW

Serveralias LocalhostServeralias 192.168.0.90

Serveralias 211.167.83.165

ServerAdmin webmater@5757.com

DocumentRoot / usr / local / tomcat / webapps

Errorlog logs / home.net-errorlog

Customlog logs / home.net-access.log common

JKuriSet worker ajp13: localhost: 8009

When configuring Server.xml: Configure management ports and connecting port sequences to reverse Catalina.out, you can observe: When you connect with Apache, you don't wait.

Port = "8009" MINPROCESSORS = "5" maxprocessors = "75"

Enablelookups = "True" redirectport = "8443"

Acceptcount = "10" debug = "0" connectionTIMEOUT = "0"

Useurivalidationhack = "false"

ProtocolHandlerclassName = "org.apache.jk.server.jkcoyotehandler" />

Port = "8080" MINPROCESSORS = "5" maxprocessors = "75"

Enablelookups = "True" redirectport = "8443"

AcceptCount = "100" debug = "0" connectionTIMEOUT = "20000"

Useurivalidationhack = "false" disableuploadtimeout = "true" />

# Server.xml does not support Chinese comments

# The modification of Java under Shared / Classes can not be reacted to the JSP to win the bid. Can't work immediately.

The above installation is equally suitable for jakarta-tomcat-5.0.12 in the following configuration

# When configuring jakarta-tomcat-5.0.12, pay attention to Server.xml

No closed.

BUG:

In the Catalina.out newspaper error.

Overall feelings Tomcat 5.0 is improved in performance. The speed started quickly.

转载请注明原文地址:https://www.9cbs.com/read-78711.html

New Post(0)