The ColdFusion installer places the K2 files into the following directories:
cfusion\bin
opt/coldfusion/verity/<platform>/bin
The K2 Server is started from the command line or from a script in the Unix environment and can be integrated as a service within the Windows NT environment. The server is designed to run with a minimum of intervention. Most configuration parameters are set in a configuration file, which can be given a user-assigned name (the default file name is k2server.ini
).
Command-line arguments include the name of the configuration file, the TCP port for incoming connections and the verbosity level for informational messages. The K2 Server has a warm restart capability, designed to keep the server's well-known TCP port open in case of a crash and to allow changes in the configuration file to be initialized without killing the primary server process.
The K2 Server is started by the using the following command:
k2server [<option1> <option2> ...]
The options available for this command are summarized in the following table:
The Windows batch file installed as cfusion\bin\startk2server.bat
looks like this:
set K2_MODE=SEARCH
k2server -inifile k2server.ini
To start K2 Server, open a command window and execute the batch file.
When you use the -ntservice 1
option, K2 Server runs as a Service in Windows. As a service, you can specify startup parameters for K2 Server so that it starts automatically at boot time.
On UNIX platforms, two scripts have been provided you can use to start and stop K2 Server. They are startk2server
and stopk2server
, both installed into the opt/coldfusion/bin
directory.
#!/bin/sh
# platform=`uname` case $platform in SunOS) echo "SunOS" platform=_ssol26 LD_LIBRARY_PATH=/opt/coldfusion/verity/${platform}/bin ;; HP-UX) echo "HP-UX" platform=_hpux11 SHLIB_PATH=/opt/coldfusion/verity/${platform}/bin ;; Linux) echo "Linux" platform=_ilnx21 LD_LIBRARY_PATH=/opt/coldfusion/verity/${platform}/bin ;; esac K2_MODE=SEARCH export K2_MODE INIFILE=/opt/coldfusion/verity/${platform}/bin/k2server.ini /opt/coldfusion/verity/${platform}/bin/k2server -iniFile $INIFILE exit 0