Apache integrated Tomcat realizes Tomcat load Balancing cluster +session

Source: Internet
Author: User
Tags tomcat linux

First, the environment:

System minimized installation, system first-order script:

http://linuxops.blog.51cto.com/2238445/841849

System environment: CentOS 5.8 x86_64

Application software: So the application software is placed in the/USR/LOCAL/SRC directory

Httpd-2.2.22.tar.gz

Apache-tomcat-7.0.26.tar.gz

Jdk-7u4-linux-x64.gz

Tomcat-connectors-1.2.37-src.tar.gz

Required Servers:

server1:192.168.8.222--> installation httpd, Apache-tomcat, JDK, tomcat-connectors

server2:192.168.8.223--> installation Apache-tomcat, JDK

Second, the installation of Apache

cd/usr/local/src/

Tar zxf httpd-2.2.22.tar.gz

CD httpd-2.2.22

./configure--prefix=/usr/local/apache2--enable-modules=so--enable-so--enable-cache--enable-mem-cache- Enable-rewrite--enable-ssl--with-mpm=prefork

Make;make Install

Cd..

Third, the installation of Tomcat, JDK

1. Install Tomcat

Tar zxf apache-tomcat-7.0.26.tar.gz

MV Apache-tomcat-7.0.26/usr/local/tomcat

2. Install JDK

Tar zxf jdk-7u4-linux-x64.gz

MV JDK1.7.0_04/USR/LOCAL/JDK

3. Set Java, Tomcat run environment variables

Vi/etc/profile

At the end of the file, add the following:

#Set Java & Tomcat Environment

Java_home=/usr/local/jdk

Export Java_home

Jre_home=/usr/local/jdk/jre

Export Jre_home

Classpath=/usr=/usr/local/tomcat/common/lib/:/usr/local/jdk/lib:/usr/local/jdk/jre/lib

Export CLASSPATH

Path= $PATH:/usr/local/tomcat/bin/:/usr/local/apache/bin:/usr/local/jdk/bin:/usr/local/jdk/jre/bin

Export PATH

Tomcat_home=/usr/local/tomcat

Export Tomcat_home

Let environment variables take effect immediately:

Source/etc/profile

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.