Want your ColdFusion 9 Enterprise multiple instances on Linux to automatically start? Out of the box, it seems CF 8 & 9 are not set up to do this automatically.
1) the permissions were wrong. Even though I installed CF to be run as "nobody", some aspects need root access, so the "RUNTIME_USER" may need to be root or have root permissions. This is a little over my head, but suffice to say it didn't run CF instances properly as "nobody", but was fine with "root".
2) as you add new CF instances, the script (at /etc/init.d/coldfusion9multi on RedHat) doesn't get updated for you. You must manually add the new instances to the script after you add the instances in the CF Administrator.
Here's my /etc/init.d/coldfusion9multi script, which also shows how to auto-start Verity and SOLR at the same time. Hope it helps.
#!/bin/sh
# chkconfig: 345 90 14
#
# Start ColdFusion 9 Multiserver instances + search services
#
# Because this is a start up script, and will be run by root, we use root
# user to run these services
CF_DIR="/data/jrun4"
#RUNTIME_USER=""nobody""
RUNTIME_USER=""root""
# 1.0/Initial
#
##
if [ ${1:-noset} = "stop" ]; then
su $RUNTIME_USER -c "$CF_DIR/bin/jrun -stop cfusion"
su $RUNTIME_USER -c "$CF_DIR/bin/jrun -stop cfinstance_01"
su $RUNTIME_USER -c "$CF_DIR/bin/jrun -stop cfinstance_02"
su $RUNTIME_USER -c "$CF_DIR/bin/jrun -stop cfinstance_tasks01"
su $RUNTIME_USER -c "$CF_DIR/verity/bin/cfsearch stop"
su $RUNTIME_USER -c "$CF_DIR/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/solr/cfsolr stop"
exit 0
fi
su $RUNTIME_USER -c "$CF_DIR/bin/jrun -start cfusion >& $CF_DIR/logs/cfusion-event.log &"
su $RUNTIME_USER -c "$CF_DIR/bin/jrun -start -nohup -childVM cfinstance_01"
su $RUNTIME_USER -c "$CF_DIR/bin/jrun -start -nohup -childVM cfinstance_02"
su $RUNTIME_USER -c "$CF_DIR/bin/jrun -start -nohup -childVM cfinstance_tasks01"
su $RUNTIME_USER -c "$CF_DIR/verity/bin/cfsearch start"
su $RUNTIME_USER -c "$CF_DIR/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/solr/cfsolr start"
Aaron Longnion
Director of Internet Technology
www.PeopleXS.com
www.Twitter.com/aqlong
www.peoplexs.com/communities/nl/
