I always set ColdFusion to NOT run at startup - why have it eating resources when you aren't using it? On Windows I had a few batch scripts to easily kick off ColdFusion. I dug around looking for something similar for Linux... I found a few things which I've added to my wiki in the ColdFusion section.
I basically came up with a very simple bash script:
-
#!/bin/bash
-
read -p "Press ENTER to start ColdFusion and Apache (must be root!)"
-
/etc/init.d/apache2 start
-
/opt/coldfusion8/bin/coldfusion start
-
read -p "Services started. Press ENTER to continue..."
Save this to a cfstart.sh file or something. Give it executable rights. Then it's just 'sudo ./cfstart.sh'. And of course you can make the same thing to stop the services. I'm running Ubuntu 7.10 so if you are on something different (RedHat) you'll have to change your paths, etc...

You May Also Enjoy Reading:
7 Comments
These scripts would work great on a development box, but if you ever deployed this on a develop machine, I would recommend looking at the scripts that were created by Steven Erat. Just launching CF as a privileged user can create some security issues.
http://www.talkingtree.com/blo.....ootScripts
These scripts are written for a RedHat flavor, but could easily be modified.
David - great point. Yes this is certainly intended ONLY for development.
Thanks Jim. I am not much on unix commands but I was was using gksudo -d -k -S -u [username] command to start my cf server. I took your script and changed it around a little, now it doesn’t prompt me for a password and I can close the term session when finished running. Running it is just ./cfstart.sh
#!/bin/bash
gksudo -d -k -S /etc/init.d/apache2 start
gksudo -d -k -S -u [username] /opt/jrun4/bin/jrun start cfusion
i guess I had root not [username] in the script to be able to close the term session and still be able to run cf.
You could make use of the actual Adobe scripts stored in /etc/init.d/ which would save the typing.
I’m not sure these get installed unless you choose the ’start CF at start up’ option in the installer, in which case you can choose that then
rm /etc/rc.d/rc*/*coldfusion_*
or use chkconfig (or your Linux’s varient) to set it not to start itself.
The scripts are installed if you use the default setup, but they are not installed if you choose the Multiple Instance (w/JRun) setup.
Actually, the bash script above only allows the services to be started and you have to be logged on as root in order to start the services. Then Apache and CF8 run with their own users. Apache runs with the ‘apache’ user and CF8 runs with ‘nobody’ by default.
To stop them from starting at boot, you would use the commands:
>chkconfig httpd off
>chkconfig coldfusion_8 off
… and then run the bash to manually start them.
*The above commands are for Red Hat and their variants, not sure about Ubuntu.