Tomcat 5.0 + Apache 2.0 is fully installed

xiaoxiao2021-03-06  85

Apache httpd-2.0.47 Tomcat Jakarta-Tomcat-4.1.24 JK2 PHP-4.3.3 installation:

Server environment:

Redhat Linux 8.0

J2SDK1.4.1_02

Tomcat 4.1.12 binary

Apache 2.0.47 Built from Source

JK2 Connector Source from jakarta.apache.org

Install JDK:

Download: J2SDK-1_4_1_02-Linux-i586.bin

Install JDK in /usr/local/j2sdk1.4.1_02

Create soft connection JDK under / usr / local

#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

# Change the shell file properties:

#CHMOD 755 / Etc/profile.d/java.sh

# View if it is correct

#ewhich java

/ usr / local / jdk / bin / java

Install 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

# Modify HTTP.CONF specific modification, please refer to Apache 2.0 Documentation

# 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 the way Apache Modules

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

#php run like shell runs 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-incrudes

--enable-sockets

--with-config-file-path = / usr / local / apache / conf # php.ini file directory

# The following parameters are installed on the PHP GD library.

--with-gd = / usr / local

--Nable-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 # There is a successful installation

# Modify Apache http.conf

Add to

LoadModule PHP4_Module Modules / Libphp4.so

AddType Application / X-httpd-php .php

Install 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

#Nely Http: // Yourip: 8080 / Tomcat page normally displayed

Install 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 send 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 /

Configuring $ CATLINA / CONF / Server.xml

Debug = "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 channelsocket

Channelsocket.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.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

[URI: 211.167.83.165 / *. jsp]

Worker = ajp13: Localhost: 8009

# Edit http.conf

#modify

DocumentRoot "/ usr / local / tomcat / webapp"

# Add index.jsp

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

LoadModule 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 Localhost

Serveralias 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 connected port sequences upside down

Observe in Catalina.out:

In this way, it is not necessary to wait for Apache.

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-124053.html

New Post(0)