Installing JSP in Linux environment [JSP]

Source: Internet
Author: User
Tags copy tomcat linux
JS Apache 1.3.12 + Tomcat 3.1.1 + JDK 1.2.2 + mod_jserv.so

1. Required Software and downloads

Apache_1.3.12.tar.gz

http://www.apache.org

Jakarta-tomcat-3.1.1.tar.gz

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.1.1/bin/

Jdk-1_2_2_007-linux-i386.tar.gz

Http://java.sun.com/products/jdk/1.2/download-linux.html

Mod_jserv.so

Http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.1.1/bin/linux/i386



2. Installation

First, copy the above four files to the/usr/local directory.

CP apache_1.3.12.tar.gz/usr/local

CP jakarta-tomcat-3.1.1.tar.gz/usr/local

CP jdk-1_2_2_007-linux-i386.tar.gz/usr/local

CP mod_jserv.so/usr/local



The order of installation is as follows:

1) Install JDK

Cd/usr/local

Tar zxpf jdk-1_2_2007-linux-i386.tar.gz

Generate/usr/local/jdk1.2.2 Directory



2) Install Apache

Tar zxpf apache_1.3.12.tar.gz

Generate/usr/local/apache_1.3.12 Directory

CD apache_1.3.12

./configure

The--PREFIX=/WWW//Apache installation path is/www

--ENABLE-MODULE=SO//Support mod_jserv.so

Make

Make install

Make clean



3) Copy mod_jserv.so

Copy the mod_jserv.so to the Apahce libexec directory

Cd/usr/local

Cp/usr/local/mod_jserv.so/www/libexec



4) Install Tomcat

Cd/usr/local

Tar zxpf jakarta-tomcat-3.1.1.tar.gz

Generate/usr/local/jakarta-tomcat Directory



5) Configure System variables

Vi/etc/profile//Edit/etc/profile

At the end of the file, add:

Path= "$PATH:/usr/local/jakarta-tomcat/bin:/usr/local/jdk1.2.2/bin:/usr/local/jdk1.2.2/jre/bin"

java_home=/usr/local/jdk1.2.2

Export Java_home

Jre_home=/usr/local/jdk1.2.2/jre

Export Jre_home

Tomcat_home=/usr/local/jakarta-tomcat

Export Tomcat_home

Classpath=/usr/local/jdk1.2.2/lib:/usr/local/jdk1.2.2/jre/lib

Export CLASSPATH


6) Configure httpd.conf

Copy the tomcat.conf file to the Apache Conf directory

Cp/usr/local/jakarta-tomcat/conf/tomcat.conf/www/conf

Edit Apache's http.conf

Vi/www/conf/httpd.conf

At the end of the file, add:

Include/www/conf/tomcat.conf


7) Start Apache

Cd/www/bin

./apachectl Start

(Off use:./apachectl stop)



8) Start Tomcat

Cd/usr/local/jakarta-tomcat/bin

./tomcat.sh Start

(Off use:./tomcat.sh stop)



9) Test JSP

Open Browser, typing

Http://localhost/examples


If you see the Jsp,servlet directory, your Apache and Tomcat are connected successfully.

You can use JSP and servlet.


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.