JDK + Apache

zhaozj2021-02-12  175

JDK APACHE_2.0.47 Tomcat-5.0.19 combined configuration

- The most comprehensive good information on the Internet (who said? The author said)

Author: weibin (welcome to reprint, please retain the right of authorship)

In order to take a server environment, I am Warm Warm, turning over the mountain, so I can't easily find some related documents, there are many people who have not been used because of the version. It took a whole day to configure success! Stealing, don't dare to enjoy! With the discharge, the same rookie is the same, and it is also for the rookie to fight for the rookie. At the same time, it reflects the existence of itself. It cannot always refer to the articles of prawn. Today, "put" on a prawn, no Coin, please also ask the real prawns to point one or two ... nonsense less, start! Prepare materials:

Download some raw materials (of course, it is online)

Apache2.0.47:

download link:

http://apache.te8.com/dist/httpd/binaries/win32/apache_2.0.47-win32-x86-no_ssl.msi

Tomcat5:

download link:

http://apache.linuxForum.Net/dist/jakarta/tomcat-5/v5.0.19/bin/jakarta-tomcat-5.0.19.exe

These two guys should be quite new! (Something this to Today's April 9, 2004)

JDK

JDK because there is a ready-made old version 1.3, although you want to use new, but don't want to go down, the next is very slow, so no.

In addition, a DLL file is also required, which is said to be coupled with Tomcat (Apache is connected to Tomcat), and online said that there is no MOD_JK_2.0.47.DLL with Apache_2.0.0.0.47.0.0.47.0.0.46. DLL is replaced, but the download address of Mod_jk_2.0.46.dll provided online (http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.4/bin/win32/mod_jk_2. 0.46.dll) Covenant has been changed by the official website, at least in today, I can't get down, I can try again, I can try again, I can go down :).

I use MOD_JK_1.2.5_2.0.47.dll I suspect that it is the legend of MOD_JK_2.0.47.DLL in the legend, just that I personally think (I feel very similar, Intuitive tell me, MOD_JK_1 .2.5_2.0.47.dll is not mod_jk_2.0.47.dll's twins brothers are its substitute), do not know if it is true, please know in the comments, so as to avoid my mistakes, you are getting Before affirming, if you want to take risks, you can pay boldly, because I have been successful. Ok, don't pull it out! Its download address is:

URL http://apache.LinuxForum.Net/dist/jakarta/tomcat-connectors/jk/binaries/win32/mod_jk_1.2.5_2.0.47.dll

After the above raw materials are ready, start working!

1, install JDK (I am from D-D) 2, set my computer / attribute / advanced / environment variable / new system variable variable name: java_home variable value: d: /jdk1.3 (point to JDK's actual installation path)

3. Modify the system variable ClassPath editing variable value plus ...;% java_home% / bin;% java_home / lib;

4, install Apache_2.0.47-Win32-x86-NO_ssl.msi installation path is set to: D: / Apache2

5. Install the Jakarta-Tomcat-5.0.19.exe installation path set to: D: / Tomcat5

Set my computer / attribute / advanced / environment variable / new system variable variable name: Tomcat_hmom Variable: D: / Tomcat5 (pointing to JDK's actual installation path)

path)

Modify system variable ClassPath editing variable value plus ...;% tomcat_home% / bin;

After all the above, you can test the default service before installation:

Please start the Apache2 with Tomcat5 server.

1). Open the browser, type: http: // localhost test: You can see the welcome interface of Apache2 in the browser. Description Apache2 works fine. (Note that the Tomcat default port is 80, if there is Other programs, please change the port number)

2). Open the browser, enter: http:// localhost: 8080 test: At this point you can see Tomcat's welcome interface. Description Tomcat works fine. (Note that the Tomcat default port is 8080, If you have other programs, please change the port)

Originally Tomcat has a server that comes with itself, but because of function and stability, use a special Apache server instead of its own server, the benefits, don't say, why do you use this? This is not "popular" or "business wonderful", and the two guys are all free open source, so this requires both. Methods as below:

6, put the connector MOD_JK_1.2.5_2.0.47.dll copy to d: / apache2 / modules /

7. Open the httpd.conf under D: / Apache2 / Conf, find "DirectoryIndex", add index.jsp after index.html.

8. At the end of httpd.conf, the following code is added (the purpose is to set the connection between Apache and Tomcat, let Apache encountered the JSP file, put it in the background, Tomcat destination: Open D: / Apache2 / conf / httpd. Conf, add the following code and save it. Note: Every line # and after the Chinese characters are comment content, you can remove it or another line of comments, here is to understand, # 英 为 英 半 状态Next symbol)

####### - Begin - ###################

LoadModule JK_Module Modules / MOD_JK_1.2.5_2.0.47.dll

# Loading module, used to process connections (annotations to the previous line, the same below)

JKWorkersFile "D: /tomcat5/conf/Workers.properties"

# Set the work file of the module

JKLogfile "D: /TOMCAT5/LOGS/MOD_JK2.LOG"

# Set the log file working by the module, will be built when TOCMAT starts

JKLoglevel Info

###### --- End --- ############ 9, configure Tomcat

1). In D: / Tomcat5 / Conf, create a new WORKERS.PROPERTIES file. The content is as follows:

##### - Begin - ########

Workers.tomcat_home = d: / tomcat5 # Let the MOD_JK module know Tomcat

Workers.java_home = d: /jdk1.3 # Let the mod_jk module know J2SDK

PS = /

Worker.list = ajp13 # Module version, existing AJP14, do not modify

Worker.ajp13.port = 8009 # work port, if you don't take it, you don't have to modify it.

Worker.ajp13.host = localhost # host, if the above Apache host is not localhost, make a corresponding modification

Worker.ajp13.type = ajp13 # Type

Worker.ajp13.lbFactor = 1 # Agent number, no modification

###### --- End --- #######

2). Description Tomcat5 server.xml already contains AJP1.3, no modification

10, set the virtual host

(In fact, the following is still the project folder under Tomcat, can be specified, and the following will be described in detail below D: / Apache2 / confed

The corresponding part of httpd.conf / httpd.conf is modified as follows

######## - beging - ########

#localhost is this machine, you can use this unit IP

ServerAdmin weibin975@sohu.com # Your mail address

Documentroot D: / Tomcat5 / WebApps / root # Total of your project group

ServerName Localhost

# Your service name, if your machine has a domain name, set it to a domain name, but the current machine is test

ErrorLog logs / robornet_home_log.txt

# 错误 日 d d / / 下 下 名 名 名

Customlog logs / robornet_custom_log.txt Common

# 日 日, under D: / Apache2 / logs, use any other name

JKMOUNT / servlet / * ajp13 # Let Apache support to transmit to servlets to Tomcat resolution

Jkmount /*.jsp Ajp13 # Let Apache support to transfer JSP to Tomcat resolution

######## - End - ########

In addition, look for "listen" in this document.

Used for native test: Listen 127.0.0.1:80

11 Start AppAche and Tomcat Server

Open two IE windows

http: // localhost

http: // localhost: 8080

Like the contents of the page, it is said that it has been successful!

Because I spent a lot of effort here, I showed success! So write this article to reduce the pain of the rookie, so I want to write this article!

Note: If you use the agent, the proxy server port number is if it is 80 or 8080 as if it is also conflict with the system, please deactivate the agent, or change the default port number of Apache and Tomcat (Note: No 0-1023)

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

New Post(0)