Back our Angular 4 Book on Kickstarter.

Using the Command Line to set up a ColdFusion Multiserver Instance as a service

To make a long story short, I reinstalled my operating system a few days ago. I had to decide whether to do a full disaster recovery or to start from scratch and I decided to start from scratch.

I had all my old data files from Apache and the ColdFusion 8 multiserver install. But, I wasn't sure how to easily copy over the configurations and have all my services set up. Thankfully the CF-GURU list was able to push me in the right direction.

The essence is that you can easily copy the ColdFusion [or JRun4] directory from one place to another and things just tend to work. However, if you do that, you lose the services that CF installs. Knowing that, this is the path I took:

First, I installed Apache.

Second, I installed ColdFusion 8.

I tested that both were working, and as expected they were. This was before I started tweaking. The install gave me back the ODBC services, the .NET service and the Search service. So far so good.

I ran a winmerge compare on the new JRun4 directory and the old JRun4 directory. I'm surprised at how many of the files were the same. I copied over all of the backup files over their new replacements and crossed my fingers.

Next I ran a winmerge compare on the new Apache configuration with the old Apache configuration. I was a bit worried about this because the Apache version I installed was a few point releases later. Other than seeing different mime type files; I was able to merge my old settings into the new settings. I didn't copy these, just merged them.

Then I restarted all services and launched the CF Admin. It let me in, it showed me the instance manager with all my features. I started a few of them and tested their respective domains by browsing to some ColdFusion pages. Everything was working great. It was a weight off my shoulders.

Yet, I still didn't have a separate windows service for each CF instance. To do that, I needed to use the jrunsvc.exe command line tool. It is found in JRun4\bin.

I used the tool like this:


jrunsvc -install nameOfJRunInstance "Service Name" "Service Name"

So, specifically in my situation I ran:


jrunsvc -install TheFlexShow "CF TheFlexShow" "CF TheFlexShow"

To set up my local instance of ColdFusion for The Flex Show's web site.

Under most normal circumstances, the instance manager will create a service for you and you won't need to do it manually. But, if you do; there is your approach.


Although this time I answered my own question, I do love to help out others. If you want help, please ask. I can even take confidential questions over at www.asktheflexpert.com, or you can put me on the spot life at a Flextras Friday Lunch recording session.

It's only a week until 360Flex in DC, so be sure to get there and stop by the booth and say howdy. Order you tickets with this link and I get Karma points from the 360|Flex folks. If you ask real nicely I may be able to get you a discount code. If you already have tickets; be sure to book your room at the conference hotel. This is the place you'll want to be to optimize your networking Karma.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
All Content Copyright 2005, 2006, 2007, 2008, 2009 Jeffry Houser. May not be reused without permission
BlogCFC was created by Raymond Camden. This blog is running version 5.9.2.002.