Install JSP in Linux

Source: Internet
Author: User

Apache 1.3.12 + tomcat 3.1.1 + JDK 1.2.2 + mod_jserv.so

1. Required software and download

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 installation sequence 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 \

-- Prefix =/www // The installation path of apache is/www

-- Enable-module = so // supports mod_jserv.so

Make

Make install

Make clean



3) Copy mod_jserv.so

Copy mod_jserv.so to the libexec directory of apahce.

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

Add at the end of the file:

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 conf directory of apache.

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

Edit apache http. conf

Vi/www/conf/httpd. conf

Add at the end of the file:

Include/www/conf/tomcat. conf


7) start apache

Cd/www/bin

./Apachectl start

(Disable:./apachectl stop)



8) start tomcat

Cd/usr/local/jakarta-tomcat/bin

./Tomcat. sh start

(Disable use:./tomcat. sh stop)



9) test jsp

Open the browser and enter

Http: // localhost/examples


If you see the jsp and servlet directories, your apache and tomcat have been 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.