Java Web application in Linux (i)
Install Apache Jserv 1.1.2 under Redhat
Although the Apache Jserv development team is now engaged in Tomcat development, and the Apache Jserv only supports the Servlet 2.0 standard and additional software (GNUJSP) is required to support JSP, Apache Jserv is more stable than Tomcat at this stage, so now Apache jserv+gnujsp is more suitable for use in the Web. If you want to use servlet2.2 and jsp1.1, use Tomcat to see the installation of Tomcat. This article describes the installation of Apache Jserv 1.1.1 under Redhat.
One, the required software:
jdk_1.2.2 Download from http://java.sun.com
apache_1.3.12 Download from www.apache.org
Apache jserv-1.1.1 Download from java.apache.org
jsdk2.0 (only 2.0) download from http://java.sun.com
Second, the installation process
Please install the JDK first, you can refer to the JDK installation, and set the Classpath and path.
Copy apache,apache Jserv source package to/tmp
#tar Xvzf apache_1.3.12.tar.gz
#tar Xvzf apachejserv-1.1.2.tar.gz
1, static compilation, that is, compiled into Apache
#cd apache_1.3.12
#./configure--prefix=/usr/local/apache
Configure Apache Jserv Compilation parameters
#cd. /apachejserv-1.1.2
#./configure \
--prefix=/usr/local/jserv \
--with-apache-src=.. /apache_1.3.12 \
--WITH-JDK-HOME=/USR/LOCAL/JDK \
--with-java-platform=2 \
--with-jsdk=/usr/local/jsdk/lib/jsdk.jar
#make
#make Install
Compiling Apache and Apache Jserv
#cd. /apache_1.3.12
#./configure \
--prefix=/usr/local/apache \
--activate-module=src/modules/jserv/libjserv.a
#make
#make Install
Run #/www/bin/httpd-l Check to see if Mod_jserv is compiled into Apache.
2, dynamic compilation (DSO mode)
#cd apache_1.3.12
#./configure
--prefix=/usr/local/apache
--enable-shared=max
#make
#make Install
Configure Apache Jserv Compilation parameters
#cd. /apachejserv-1.1.2
#./configure \
--prefix=/usr/local/jserv \
--WITH-APXS=/USR/LOCAL/APACHE/BIN/APXS \
--WITH-JDK-HOME=/USR/LOCAL/JDK \
--with-java-platform=2 \
--with-jsdk=/usr/local/jsdk/lib/jsdk.jar
#make
#make Install
If you want to use MOD_SSL, please add--WITH-EAPI option
Third, change the configuration file
Join in the/www/conf/httpd.conf
Include/usr/local/jserv/etc/jserv.conf
If you use the DSO mode installation, please put the jserv.conf
LoadModule Jserv_module/usr/local/jserv/libexec/mod_jserv.so before the comments are removed
Start Apache
Test http://yourserver/servlets/IsItWorking with a browser
Have you seen the Yes,it ' s working!? You did it!!
You can change the jserv.conf in the
SetHandler Jserv-status
Order Deny,allow
Deny from all
Join your trusted host allow from XXXX
This allows you to see the configuration information for your Apache Jserv via http://yourserver/jserv/on the trusted host (note that the following "/" is not less).
Then in/usr/local/jserv/servlets down into your own servlet class experiment effect, test results show that under redhat6.2 No Chinese display problems, all ok!
Other settings for servlet zone, load balance, and more, please refer to the Apache Jserv documentation and java.apache.org Web site
China Linux Forum All rights reserved