Tomcat+apache Configuration under Windows

Source: Internet
Author: User
Tags resource win32 tomcat

Tomcat, in addition to supporting Java servlet/jsp, can also be used as a Web server, but in the static HTML files, picture files, such as parsing efficiency is not as efficient as the Apache httpd execution. Server with Tomcat if the site has a large number of visits, system resource consumption will be significantly elevated, the author recently encountered this problem in the implementation of the project, they also think of the application of Tomcat+apache services. Apache is responsible for static resource processing, and Tomcat is responsible for the processing of dynamic resources such as JSP and Java servlet. Read a lot on the internet to introduce the Apache and Tomcat integration posts. Mostly for each other, there are several key issues are not clear, and most of the article explained in the version of the software are already relatively old. Therefore, the author summed up the experience of their actual operation, hope to help everyone.

Preparatory work:

1, Apache 2.0.55

Download Address: Http://apache.justdn.org/httpd/binaries/win32/apache_2.0.55-win32-x86-no_ssl.msi

2, Tomcat 5.5

Download Address: http://tomcat.apache.org/download-55.cgi

3, JRE1.5.0 Update6

Download Address: http://java.sun.com/j2se/1.5.0/download.jsp

You can also choose to install JDK,JDK not only contains support for running Java applications, but also includes J2SE development packages. However, if you are just applying, it is recommended that you download only the JRE.

4, jk-apache-2.0.55

Download Address:

Http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.15/mod_jk-apache-2.0.55.so

Note that the JK version must be the same as your Apache version. JK download can be directly to the apache.org website download, there are a variety of versions, applicable to a variety of operating systems, the address is as follows:

http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/

Windows users enter the Win32 directory, different Tomcat corresponds to different JK file extensions, possibly *.dll, or *.so, download the appropriate JK version according to your Tomcat version.

installation, the sequence of software installation can be adjusted appropriately, but the JRE (JDK) must be installed before Tomcat:

1. Install JRE (JDK)

Select the default installation here, (after the old version of the JDK installation, you need to set the system's environment variables, JRE and JDK1.5.0 version does not set it does not matter.) After the installation is complete, you can choose to set your system environment variables according to the following example: My Computer-> right key properties-> General-> advanced-> Environment variables

Java_home = d:\Java\jre1.5.0_06

CLASSPATH =.; D:\java\jre1.5.0_06\lib\dt.jar;d:\java\jre1.5.0_06\lib\tools.jar

PATH = D:\Java\jre1.5.0_06\bin

Note that the file path should be changed to the path you actually installed.

2, Apache Installation

Note here that if you have IIS installed on this computer and use 80 ports, you must first stop or disable IIS in the service. Software can be installed by default. Setup network domain and server name as localhost, set your email address, below will let you choose only for the "current user" or for all users. The default selection for all users. This way, Apache consumes 80 ports and is powered on as a system service.

Once the installation is complete, you enter in the browser and you will see the Apache success page. Apache's main directory is d:\Apache\Apache2, at this time Apache, has run, you can see his icon in the window tray, double-click the icon, in the pop-up window select Open Apache Monitor, click Stop, Stop APACEH service, because the following to install Tomcat and JK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.