In a UNIX development environment, the CAS Service can be
started from the command line. In a UNIX production environment, however,
Oracle recommends starting it from
inittab
.
In UNIX you run the CAS Server using
cas-service.sh
, located in
usr/local/endeca/CAS/<
.
You can write a script that calls
version
>/bincas-service.sh
and is referenced in
inittab
.
When writing your script, it is recommended as a best practice that you run the CAS Service as a user other than root.
This sample script (named
start_cas_service.sh
) sets the
ENDECA_USER
variable to the “endeca” user and then
issues an
su
command to change to the “endeca” user:
#!/bin/sh
ENDECA_USER=endeca
CAS_ROOT=/usr/local/endeca/CAS/<version>
CAS_WORKSPACE=/usr/local/endeca/CAS/workspace
# change to user endeca
su $ENDECA_USER -c "cd $CAS_ROOT/bin; \
$CAS_ROOT/bin/cas-service.sh >> $CAS_WORKSPACE/logs/cas-service-wrapper.log 2>&1"
The
start_cas_service.sh
script is then referenced in
inittab
with an entry similar to this example:
ecas:2345:respawn:/usr/local/endeca/CAS/<version>
/bin/start_cas_service.sh
When writing your startup script, keep in mind that it is server-specific, and therefore its details (such as paths and user names) depend on the configuration of your server.