Install and configure Tomcat + Apache + mod_jk

Source: Internet
Author: User
Tags gz file
Install and configure Tomcat + Apache + mod_jk -- Linux Enterprise Application-Linux server application information. For more information, see. Advantages: the configuration is simple and efficient, avoiding the trouble of compiling webapp. so.
Disadvantages: mod_jk in linux is hard to find.

1. Install JDK. This is very simple. Run

./J2sdk1.4.1 _ 02.bin

Cp-R j2sdk1.4.1 _ 02 // usr/local/j2sdk141

Export JAVA_HOME =/usr/local/j2sdk141
Export PATH = $ PATH:/usr/local/j2sdk141/bin:/usr/local/j2sdk141/jre/bin
Export CLASSPATH = "./:/usr/local/j2sdk141/lib:/usr/local/j2sdk141/jre/lib" # Set Environment Variables

2. install Tomcat 4.1.29and copy the downloaded Tomcat 1.4.29.tar.gz file to the corresponding directory.

Tar xvzf tomcat4.1.29.tar.gz

Cp tomcat4.1.29/usr/local/tomcat4

Export CATALINA_HOME =/usr/local/tomcat4 # Set Environment Variables

3. install apache and redhat. I installed 2.40.20 with redhat9.

4. Installed mod_jk, I installed mod_jk-tomcat4.1.18-rh80.i386.rpm, support tomcat4.xx and httpd2.xx series version.

Note: Only by installing jdk and tomcat in a specific directory can mod_jk be detected, So we force install

Rpm-I -- nodeps mod_jk.rpm

Now all the required software has been installed, and the rest is the configuration work.

5. mod_jk Configuration

Cd/etc/httpd/conf/
Vi mod_jk.properties

Modify workers. tomcat_home is the tomcat installation directory, workers. java_home is the jdk installation directory. Note that the default port connecting to tomcat in this file is 8109, but the default port on tomcat is 8009, So modify it here.

Workers. tomcat_home =/usr/local/tomcat4
Workers. java_home =/usr/local/j2sdk141
Worker. list = ajp13
Worker. ajp13.port = 8009
Worker. ajp13.host = localhost
Worker. ajp13.type = ajp13

6. apache configuration

Vi httpd. conf

Add the following line to LoadModule

LoadModule jk_module modules/mod_jk.so

Add the configuration file mod_jk.
QUOTE:
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.