CFMX MultiServer Set up

This is more a "note to self" than anything else, but here you go...

I've been messing about with the Multi server set up for CFMX7. J2EE applications, Clustering and multiserver installations is something I haven't really looked at since umm... CF4.5.1, so I thought it was time to look at it all over again.

I had a few hassles, but with Andy Allan of the Scottish CFUG's help I've now ironed out all the wrinkles on my dev server set up.What I've got is Apache 2.0.55, with Jrun 4 Updater 6 running multiple CF instances and sites, one of which is actually my test bed for this blog. (Bit naughty really seeing as I run CFMX standard with IIS on my production server, but you have to try these things out some how!)

Anyway, here's the steps to a working install.

  1. Install Apache
  2. Install CFMX 7.01 using option 2 (Multi-Server install)
  3. Do another install of CFMX 7.01 using option 3 (J2EE install) making an cfusion.ear file
  4. Use something like winrar to unzip the ear file into a folder called cfusion-ear
  5. Extract the cfusion.war into cfusion-war folder
  6. Hang onto the cfusion.ear file, so you don't have to build it again, but delete the cfusion.war file out of the folder structure
  7. Edit the application.xml file in the cfusion-ear/META-INF folder - change the web-uri to cfusion-war rather than cfusion.war
  8. Create your various instances for your various websites in the Java Management Console (JMC)
  9. Remove the default-ear folder from the server instance folder for each instance that will be running CFMX
  10. Copy the cfusion-ear folder into the server folder for each instance
  11. Set up your websites in Apache using virtual hosts
  12. Use the wsconfig tool to connect the first Java Server Instance to apache
  13. Edit your httpd conf file.
    Leave :
    view plain print about
    1LoadModule jrun_module "C:/JRun4/lib/wsconfig/1/mod_jrun20.so"
    2JRunConfig Ssl false
    3AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfswf .cfr
    in the global part of your config file, but copy the rest into each virtual host.
  14. Change the port number on the bootstrap for each website to point at the appropriate Java Server Instance.
  15. Change the Serverstore variable to point to different numbered folders for each website and create these folders. You can put a copy of the jrunserver.store file in there, but its not required.
  16. Go into cfusion-ear\cfusion-war\WEB-INF for each server, edit the web.xml file and uncomment the SES URL settings
  17. Go into the SERVER-INF folder for each instance and edit the jrun.xml. Set the deactivated attribute to "false" under the jrun.servlet.jrpp.JRunProxyService class, if it isn't already.
  18. Start your instances and start your apache server (or restart as appropriate)
  19. and thats it....

TweetBacks
Comments
A wee addition to my check list...

To set up a new instance as windows service, open up command window and use the following command :

{install path}\JRun4\bin\jrunsvc -install myinstancename "My Instance Service Title" "My Instance Service Description"

Make sure that the service isn't running in the JMC and then start your shiney new JRUN service.
# Posted By StephenM | 3/13/08 9:39 PM