The standalone deployment mode is preferred because
it supports dynamic transport and module deployment.
Standalone server startup scripts are provided in the
[install]/bin/
directory.
The script startup.bat
is provided for Microsoft Windows platforms
and the script startup.sh
for Linux, UNIX and Mac.
Certain graphical libraries used by the Control Panel and which are available
for applications are contained in the util-image module.
These libraries will
fail on a "headless" server unless a system property of java.awt.headless
is set to true.
The start.sh
script contains a line which
sets this property to "false".
The commandline switch
-Djava.awt.headless=true
must be added to the JDK flags when starting
NetKernel.
Unfortunately it cannot always be set to true because it will cause
true AWT/Swing applications hosted to fail: PingPong is an example
of one of these applications.
Running NetKernel as a service
NetKernel can be run as a service on most platforms. Running as service allows it to be started automatically
when the operating system starts and shutdown cleanly when the operating system is shutdown.
Win32/Windows
We ship a service wrapper .exe in the directory [install]/bin/win32-service/. This is based on
the Java Service Wrapper by Tanuki Software. This directory contains a readme.txt detailing usage.
Linux
An init.d script named netkernel is provided in the [install]/bin directory.
This script can be used to execute NetKernel as a daemon on Linux.
The script is commented to provide the Linux chkconfig program
with information it requires
to integrate the NetKernel startup and shutdown process
with Linux's startup and shutdown process.
Please refer to your Linux documentation about running chkconfig
on your distribution.
Running NetKernel behind Apache
When running NetKernel standalone in production you may wish to run it
behind the Apache web server. This will give you the benefits of logging
and extra configuration options.
To run behind Apache you should map your /application/ path from the backend 8080 HTTP server to a path on the Apache server. In apache
you can use the ProxyPass directive:
ProxyPass /application/ http://localhost:8080/application/
In this configuration you should firewall the 8080 port on your host platform (consult your host operating system
documentation). You should read the security documentation before going live with a production system.