User Guide
Starting K2 Server 121
Windows batch file example
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.
Running K2 Server as a Windows service
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.
Linux and UNIX scripts
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.
UNIX/Linux startk2server script file listing
#!/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