Here are installation instructions for a servlet we use
in one of our products. You will need to specialize
these instructions for your own servlet, of course. (The
last 2 steps (10, 11) can be ignored.)
--
In the following steps you will have to provide
webretail's path. We will refer to it as
@@WebRetailPath@@. Each time you encounter
it you will have to substitute it with your
real webretail's path. For example it could be
/Matranet/webretail
Linux Installation
------------------
0. What is required:
- Linux RedHat 6.0
- Apache 1.3.6
- ApacheJServ 1.0
- JSDK 2.0
- JDK 1.1.7 (or higher)
All of these software are freely available off the net.
1. Download source code for:
- Apache 1.3.6 [http://www.apache.org]
- ApacheJServ 1.0 [http://java.apache.org]
- JSDK 2.0 [http://java.sun.com]
Put these somewhere convenient, like /usr/local/src.
2. Configure, make, and install Apache 1.3.6. I used this
command for configuring Apache:
# ./configure \
--with-layout=Apache \
--enable-rule=SHARED_CORE \
--enable-module=so \
--prefix=/usr/local/lib/apache
NOTE: There is no reference to the JServ module as of yet.
3. Configure, make, and install ApacheJServe 1.0. I used this
command for configuring ApacheJServ:
# ./configure \
--with-apache-install=/usr/local/lib/apache \
--prefix=/usr/local/etc/jserv \
--with-jdk-home=/usr/lib/jdk117_v3 \
--with-jsdk=/usr/local/src/JSDK2.0 \
--disable-debugging
NOTE: If you wish to seek other opinions, see:
http://java.apache.org/faq
4. Setup configuration and log files for ApacheJServ.
- From bash:
# mkdir -p /usr/local/etc/jserv/conf
# cd /usr/local/etc/jserv/conf
# cp /usr/local/src/ApacheJServ-1.0/example/jserv.conf .
# cp /usr/local/src/ApacheJServ-1.0/example/jserv.properties .
# cp /usr/local/src/ApacheJServ-1.0/example/example.properties webretail.properties
- From bash:
# mkdir -p /usr/local/etc/jserv/logs
# cd /usr/local/etc/jserv/logs
# touch jserv.log
5. Modify the configuration file for Apache. This step requires
changes to the /usr/local/lib/apache/conf/httpd.conf file:
- Set the User and Group fields to match file permissions
of the installation path for M>WebRetail. You need to do
this because the M>WebRetail servlet must have read/write
access to the installation path. Since the servlet inherits
disk-access permissions from Apache (in our configuration),
it suffices to specify the User and Group fields as such.
- At the end of httpd.conf, you should add these lines:
# Include configuration file needed for mod_jserv.
include "/usr/local/etc/jserv/conf/jserv.conf"
- Set up aliases to directories holding images:
Alias /MallAdmin "@@WebRetailPath@@/data/MallAdmin"
Alias /Admin "@@WebRetailPath@@/data/Admin"
6. At this point, you should verify that servlets work under
ApacheJServ. Try this:
- From a bash shell, type:
# /usr/local/lib/apache/bin/apachectl start
- Go to your web browser and enter:
http://localhost/example/Hello
You should get a web page that says ApacheJServ is working ok.
- Now stop Apache before continuing:
# /usr/local/lib/apache/bin/apachectl stop
7. Set up /usr/local/etc/jserv/conf/jserv.conf:
- Reset ApJServProperties:
ApJServProperties /usr/local/etc/jserv/conf/jserv.properties
- Reset ApJServLogFile:
ApJServLogFile /usr/local/etc/jserv/logs/jserv.log
- Reset ApJServMount:
ApJServMount /servlets /webretail
8. Set up /usr/local/etc/jserv/conf/jserv.properties:
- Specify location of JVM:
wrapper.bin=/usr/lib/jdk117_v3/bin/java
- Specify parameters to JVM.
wrapper.bin.parameters=-ms16m
wrapper.bin.parameters=-mx64m
NOTE: These parameters allow for larger
memory limits for the JVM.
- Specify classpath:
wrapper.classpath=/usr/local/src/ApacheJServ-1.0/src/java/ApacheJServ.jar
wrapper.classpath=/usr/local/src/JSDK2.0/lib/jsdk.jar
wrapper.classpath=@@WebRetailPath@@/servlet/mwr.jar
wrapper.classpath=@@WebRetailPath@@/servlet/mssqlinet.zip
NOTE: The mssqlinet.zip contains the database driver.
- Set up a zone for webretail:
zones=webretail
webretail.properties=/usr/local/etc/jserv/conf/webretail.properties
9. Set up /usr/local/etc/jserv/conf/webretail.properties:
- Set repositories:
repositories=@@WebRetailPath@@/servlet/mwr.jar
- Set up alias:
servlet.webretail.code=com.matranet.smx.servlet.ZipServlet
- Set up argument-list for servlet:
servlet.webretail.initArgs=settings=@@WebRetailPath@@/conf/smxsettings.ini
- Load servlet when WWW server starts:
servlets.startup=webretail
NOTE: In these settings, it is essential that you use the singular
form `servlet', and not the plural form `servlets'. The trailing
`s' makes a difference.
10. Edit the file @@WebRetailPath@@/conf/smxsettings.ini
- Replace the @@WebRetailPath@@ in the following line:
webretailpath=@@WebRetailPath@@
11. Test your set up:
- From your browser, enter:
http://localhost/servlets/webretail/MallAdmin/MallAdmin.hmx
This should lead to the opening panel for setting up the
M>WebRetail Mall Administrator.
|