Installing JSP in Linux environment [JSP]
Last Update:2017-02-28
Source: Internet
Author: User
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.