Installation of JSP under Linux

  • 2020-05-05 11:43:09
  • OfStack

Install Apache+ApacheJServ+JSP
on Linux
Install the software in the following order:

I. Install Apache Web Server
a. Use RPM
If you use the RPM suite, after obtaining the Apache Web Server suite, simply type the following command to complete the installation:
[root @ localhost root] # rpm - ivh apache - 1.3 xx. i386. rpm (xx Apache Web Server version)
b. Use SOURCE
If you are using Source with Apache Web Server, Source must be compiled and installed:
[root@localhost root]# gunzip apache_1.3.xx.tar.gz (xx stands for Apache Web Server version)
[root@localhost root]# tar zxvf apache_1.3.xx.tar (xx stands for Apache Web Server version)
[root@localhost root]# cd apache_1.3.xx
[root@localhost apache_1.3.xx]# ./congifure \
> --prefix=/usr/local/apache/ \ (setting the directory you want to install is /usr/local/apache/)
> --enable-module=all \
> --enable-rule=SHARE_CORE
[root@localhost apache_1.3.xx]# make clean ; make ; make install
After completing the above steps, the installation of Apache Web Server has basically been completed.

II. Install JDK (Java Development Kits)
Follow these steps to complete JDK:
[root@localhost root]# gunzip jdk1_2_2rc2-linux-i386.tar.gz
[root@localhost root]# tar zxvf jdk1_2_2rc2-linux-i386.tar
[root@localhost root]# mv jdk1.2.2 /usr/local/jdk122
After completing the above steps, you also need to set the environment:
[root@localhost root]# vi .bash_profile
...
...
JAVA_HOME=/usr/local/jdk122
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=/usr/local/jdk122/lib/tools.jar:.
export JAVA_HOME
export PATH CLASSPATH
Note: if you are using JDK version 1.1.x, your CLASSPATH must be set to
CLASSPATH=/path/to/your/jdk/lib/classes.zip:.

III. Install JSDK
★ note: if you are using the Java Apache RPM version, please skip this section.
JSDK (Java Servlet Development Kits) must be obtained and installed to make Java Apache operational. In fact, all we need is a small portion of JSDK (a file called jsdk.jar or servlet.jar); Now all you have to do is get the file and set it to CLASSPATH:
CLASSPATH=/path/to/jsdk/lib/jsdk.jar:$CLASSPATH
export CLASSPATH

IV. Install Java Apache
. Use RPM
If you are using the RPM suite, after you have obtained the Java Apache suite, simply type the following command to complete the installation:
[root@localhost root]# rpm -ivh ApacheJServ-1.1-b2.i386.rpm
a. Use SOURCE
If you are using Source with Java Apache, then you must compile and install Source:
[root@localhost root]# tar zxvf ApacheJServ-1.1.tar.gz
[root@localhost root]# cd ApacheJserv-1.1
[root@localhost ApacheJserv-1.1]# ./congifure \
> - prefix = / usr/local/jsdk / \ (directory) you want to install
> - with - apxs = / usr/local/apache bin/apxs \ [apache apxs place full path)
> --with-jdk-home=$JAVA_HOME \
> -- with-java-platform =2 \ (set the version of JDK you are using; 1 stands for JDK 1.1.x; 2 stands for JDK 1.2.x)
> --with-JSDK=/usr/local/jsdk/lib/jsdk.jar
[root@localhost ApacheJserv-1.1]# make clean ; make ; make install
★ please note: please read the section "Java Apach test" first.

V. Install GNU JSP
After obtaining GNU JSP, follow these steps to install
[root@localhost root]# gunzip gnujsp_0_9_10.tar.gz
[root@localhost root]# tar zxvf gnujsp_0_9_10.tar
[root@localhost root]# mv gnujsp-0.9.10 /usr/local/gnujsp
[root@localhost root]# cd /home/httpd/servlets
[root@localhost servlets]# mkdir compiled
[root@localhost servlets]# chown nobody.nobody compiled

After completing the above instructions, we need to set a few more files:
1. /etc/httpd/conf/jserv/jserv.properties
[root @ localhost root] # cd/etc/httpd/conf/jserv if you are using Apache Web Server Source, so must be installed to compile and Source:
[root @ localhost root] # gunzip apache_1. 3. xx. tar. gz (xx Apache Web Server version)
[root@localhost root]# tar zxvf apache_1.3.xx.tar (xx stands for Apache Web Server version)
[root@localhost root]# cd apache_1.3.xx
[root@localhost apache_1.3.xx]# ./congifure \
> - prefix = / usr/local/apache / \ [set want install directory is/usr local/apache /)
> --enable-module=all \
> --enable-rule=SHARE_CORE
[root@localhost apache_1.3.xx]# make clean ; make ; make install
After completing the above steps, the installation of Apache Web Server is basically completed.

II. Install JDK (Java Development Kits)
Follow these steps to complete JDK:
[root@localhost root]# gunzip jdk1_2_2rc2-linux-i386.tar.gz
[root@localhost root]# tar zxvf jdk1_2_2rc2-linux-i386.tar
[root@localhost root]# mv jdk1.2.2 /usr/local/jdk122
After completing the above steps, you also need to set the environment:
[root@localhost root]# vi .bash_profile
...
...
JAVA_HOME=/usr/local/jdk122
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=/usr/local/jdk122/lib/tools.jar:.
export JAVA_HOME
export PATH CLASSPATH
Note: if you are using JDK version 1.1.x, your CLASSPATH must be set to
CLASSPATH=/path/to/your/jdk/lib/classes.zip:.

III. Install JSDK
★ please note: if you are using the Java Apache RPM version, please skip this section.
JSDK (Java Servlet Development Kits) must be obtained and installed to make Java Apache operational. In fact, all we need is a small portion of JSDK (a file called jsdk.jar or servlet.jar); All you have to do now is get the file and set it to CLASSPATH:
CLASSPATH=/path/to/jsdk/lib/jsdk.jar:$CLASSPATH
export CLASSPATH

IV. Install Java Apache
. Use RPM
If you are using the RPM suite, after you have obtained the Java Apache suite, simply type the following command to complete the installation:
[root@localhost root]# rpm -ivh ApacheJServ-1.1-b2.i386.rpm
a. Use SOURCE
If you are using Java Apache Source, then you must compile and install Source:
[root@localhost root]# tar zxvf ApacheJServ-1.1.tar.gz
[root@localhost root]



Related articles: