APACHE+TOMCAT Implementation Web Services (2)

Source: Internet
Author: User
Tags include log web services root directory tomcat
Apache|web|web Service

1, download the address

In http://www.apache.org you can download the Apache source code package apache_1.3.27.tar.gz.
In http://jakarta.apache.org/builds/tomcat/release/v4.1.12/src/you can download the Tomcat source code package jakarta-tomcat-4.1.12-src.tar.gz.
In http://jakarta.apache.org/builds/jakarta-tomcat/release/v4.1.12/bin/ You can download the compiled Tomcat application package jakarta-tomcat-4.1.12.tar.gz.

2. Compiling and installing

Assuming that the packages are downloaded to a current working directory (such as:/HOME/TMP), Apache and Tomcat will be installed in the/home directory. In the current directory we can do the following.

1) Compiling and installing Apache application services

① Solution Package

$/usr/local/bin/gzip-dc./apache_1.3.27.tar.gz|tarxf-

② compilation

$CD apache_1.3.27
$./configure--prefix=/home/apache-1.3.27
--with-perl=/usr/local/bin/perl--enable-module=so

Assuming that Perl's interpretation commands are installed in the/usr/local/bin directory, the Apache service is installed in the/home/apache-1.3.27 directory.

$make

③ Installation

$su
#make Install

2) Compiling and installing MOD_JK plug-ins

① Solution Package

$/usr/local/bin/gzip-dcjakarta-tomcat-4.1.12-src.tar.gz|tarxf-

② compilation

$CD jakarta-tomcat-4.1.12-src/src/native/apache1.3
$/home/apache-1.3.27/bin/apxs-omod_jk.so-d Solaris-i. /jk-i/
Usr/java1.3/include-i/usr/java1.3/include/solaris-lposix4-c*.c.. /jk/*.c

Suppose Java is installed in the/usr/java1.3 directory.

③ Installation

$su
#/home/apache-1.3.27/bin/apxs-i-a-njk mod_jk.so
CP mod_jk.so/home/apache-1.3.27/libexec/mod_jk.so
chmod 755/home/apache-1.3.27/libexec/mod_jk.so
[Activating module ' jkin/home/apache-1.3.27/conf/httpd.conf]

3) Install Tomcat service

Use Superuser identity to unpack the compiled Tomcat4.1.12 into the/home directory.

$su
#/usr/local/bin/gzip-dcjakarta-tomcat-4.1.12.tar.gz| (cd/home;tarxf-)

3. Parameter configuration

(1) Configure Apache Service

Use the VI command to open the Apache configuration file httpd.conf.

#cd/home/apache-1.3.27/conf
#vi httpd.conf

Add the following at the end.

Jkworkersfile/home/jakarta-tomcat-4.1.12/conf/workers.properties
Jklogfile/home/apache-1.3.27/logs/mod_jk.log

Note: The log file can be adjusted according to the specific situation.

Jkloglevelwarn
Jkmount/*.jspajp13
Jkmount/servlet/*.jspajp13

(2) Configure Tomcat service

First, modify the Server.xml file.

This assumes that the root directory of the Web page hosting Apache is/home/htdocs.



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.