Installing Cold Fusion MX7 on Windows Server 2008 R2 64bit or Windows Server 2012 R2 64bit
Installing ColdFusion MX7 on Windows 2008 R2 64bit and Windows 2012 R2
64bit
With the end of support for Windows 2003, it was time to
move our Cold Fusion services to a newer server architecture.
Though we've generally moved to ASP.NET and ASP.NET MVC, we have a few applications that were developed for Cold Fusion MX 7 around 2006.
We haven't had time to rewrite some of the old ColdFusion MX7 applications, so we kept those applications running on the old Windows 2003 platform. Since we don't develop any new applications in CFMX7 and we plan to eventually rewrite everything in .NET, we have not bothered to purchase a newer version of Cold Fusion, as is recommended by ADOBE.
NOTE: CFMX7 is not supported on Windows 2008 and Windows 2012. You should probably purchase and use the latest version of Cold Fusion for your production environment, especially if you intend on supporting those CF apps over the long term.
Given that note, here are the steps that I’ve compiled to get Cold Fusion MX7 installed and working on Windows 2008 or Windows 2012.
Step 1: Enable the Web Application Role, IIS6 Compatibility features, and
ISAPI Extensions features on the Win 2008 or Windows 2012 machine:
In Windows 2008:
- Control Panel > Programs and
Features > Turn Windows Features On or Off >
- This will open the "Server
Manager".
- Expand Roles>Web Server>
- On right panel, under
"Summary>Role Services>" click on "Add Role
Services".
- In the "Add Role
Services" window, select all options under "Management
Tools>IIS 6 Management Compatibility"
- Click on Install.
Also, for Windows 2012, Ensure CGI and ISAPI Extensions features
are installed on Windows 2012.
Server Roles -> Web Server (IIS) -> Web Server ->Application
Development ->CGI and ISAPI Extensions
Test that IIS works and install Cold Fusion MX7 on the server.
1)
Test that IIS works by browsing to the server’s
url.
2)
Install CFMX7 using the installation disk/files.
a.
This will complete successfully, but you will
have to complete the installation manually.
Configure the Application Pool
The application pool for Cold Fusion MX should be configured for
32 bit applications and I recommend setting the application pool to use the
Non-Managed Code, Classic format.
- Open IIS Manager
- Expand MachineName>
Application Pools>
- Right click on AppPool name
(eg: DefaultAppPool) and select "Advanced Settings"
- Change "Enable 32-bit
Applications" to "true". Click OK
Additional recommended Application Pool Settings for CFMX7
App Pool:
·
No Managed Code
·
App Pool Account: Use the System account.
·
Add the System account to the IIS_IUSRS group
via Computer Management -> Users and Groups.
Verify that the account has access to the CFusionMX7 and wwwroot folders
for your web site.
·
Also, if
the app pool keeps crashing, increase the Rapid Fail Protection -> Maximum
Failures setting to 9999.
o That
will prevent IIS from shutting down the app pool just because CFMX may be
having issues.
Manually Configure Websites to Run ColdFusion pages
Source: ColdFusion Manual Configuration
NOTE: these instructions are based off of installing ColdFusion root
on C:\CFusionMX7 directory. Also, we
will assume your wwwroot directory is at c:\inetpub\wwwroot.
If you install ColdFusion root on a different directory or your
wwwroot directory is elsewhere, adjust accordingly.
- Open c:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\jrun.xml .
- Find “ProxyService” and verify the value of the “deactivated“ attribute is "false"
- Create a file: c:\CFusionMX7
\runtime\lib\wsconfig\wsconfig.properties
- Edit it as follows:
1=IIS,1,false,""
1.srv=localhost,"coldfusion"
1.cfmx=true,C:/inetpub/wwwroot
Save the file
- Extract files from c:\CFusionMX7\runtime\lib\wsconfig.jar into a temp directory
Running
the jar.exe command from the JRE can extract the contents:
"c:\Program
Files\Java\jdk1.6.0_45"\bin\jar –xf wsconfig.jar
The
above command will extract the files to the current directory.
- Copy jrunwin32.dll and
jrun_iis6.dll from extracted files to cfroot\runtime\lib\wsconfig\.
- Copy jrun_iis6_wildcard.dll
from extracted files to cfroot\runtime\lib\wsconfig\1.
- Create the file
cfroot\runtime\lib\wsconfig\1\jrun_iis6_wildcard.ini. Edit it as follows:
verbose=false
serverstore=C:/CFusionMX7/runtime/lib/wsconfig/1/jrunserver.store
bootstrap=127.0.0.1:51011
apialloc=false
ssl=false
Notes: bootstrap
port number for ColdFusion 9 is 51800, for ColdFusion 7 and 8 port number is
51011, for ColdFusion 6 the port number is 51010.
- Create the jrunserver.store
file in cf_root\runtime\lib\wsconfig\1. Edit as follows:
proxyservers=127.0.0.1:51011
Note: 127.0.0.1:51010
for MX 6.1; 127.0.0.1:51011 for MX 7/8; 127.0.0.1:51800 for MX9
- Under the IIS Management
Console, click on your computer name, click on "ISAPI and CGI Restrictions"
and add two entries:
Create an ISAPI Restriction entry for
C:\CFusionMX7\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll
And
C:\CFusionMX7\runtime\lib\wsconfig\jrun_iis6.dll.
Set permission for both to "allowed". For the description, you can call it what you
like. Eg. CFMX7 Jrun WildCard and CFMX7 Jrun
- Click on your computer name and
click on “Handler Mappings” and add one "Wildcard Script Map"
with the following parameters:
Requestpath: *
Executable: C:\CFusionMX7\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll
- After adding wildcard script
map, add script handlers for *.cfm files with following. parameters:
Request Path: *.cfm
Executable:c:\CFusionMX7\runtime\lib\wsconfig\jrun_iis6.dll
- Similarly add handler for *.cfc
files
- Just to be sure, restart
ColdFusion as well as IIS. And you should be all set.
NOTE: For
Windows Server 2012, I had issues using the wild card script handler for
jrun_iis6_wildcard.dll. So for Windows
Server 2012, I recommend using a standard script handler for
jrun_iis6_wildcard.dll, instead. Remove the
wild card script handler if you created it earlier and replace with a script
handler for *.cfm.
Request Path: *.cfm
Executable: Executable: C:\CFusionMX7\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll
Executable: Executable: C:\CFusionMX7\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll
Jrun_IIS6_Wildcard.dll
keeps crashing: On a separate server installation, the jrun_iis6_wildcard.dll
kept crashing and CFIDE/Administrator/index.cfm would not run at all. I discovered a permissions issue by looking
at the security log.
Ensure that the anonymous access account (by
default IUSR) and application pool process account (SYSTEM) have write access
to the CFusionMX7\runtime\lib\wsconfig\1\logfiles and CFusionMX7\runtime\lib\wsconfig\LogFiles
directories.
During initial configuration if you keep
seeing the jrun_iis6_wildcard.dll crash error in the application log, configure
the anonymous access account to use the application pool account which should be the local system account.
From IIS -> Click Your Web Site ->
Under IIS -> Authentication -> Click Anonymous Authentication -> Under
Actions Click Edit -> Select the radio button by Application Pool Identity.
You can set it back to IUSR after the initial CFIDE/Administrator/index.cfm
configuration wizard is complete.
Configure and Test Your Cold Fusion MX7 Install
1)
Go to IIS Manager, right click your web site and
click Manage Website -> Advanced Settings
2)
Change the Application Pool to the CFMX7
application pool you created earlier in step 1.
4)
I had to reset the CFMX password. For some reason, the password I set during
install did not work. I think the
installation may not have encrypted my special characters correctly.
To reset the password, make a backup of the
C:\CFusionMX7\lib\neo-security.xml file.
Locate the admin.security.enabled entry and
set the value to false.
Restart CFMX Application Services. Navigate to the /Cfide/administrator/index.cfm
page and Click Login without password.
From the admin console on the left menu,
click Security -> CF Admin Password and reset your password.
Patching ColdFusion MX 7 to MX7.02
a.
Install Cold Fusion and all the patches you want
on a windows server 2003 system.
NOTE: To avoid the hassle of
changing all the configuration files, ensure that CFroot (the CFusionMX7
directory) and the wwwroot directory are on the same drive letter and
directories as they are on the source and target servers. If
not, you’ll have to use a tool like Visual Studio or Dreamweaver to do a mass
search and replace of E:\CFusionMX7 to C:\CFusionMX7, where E: is the drive
where cfroot is on the win 2003 server and c: is the drive where it is
installed on the win 2008/2012 server.
You must also do a search and
replace of the directories using the forward slash.
E:/CFusionMX7 to
C:/CFusionMX7. There are a couple config
files that used the forward slash instead of the back slash.
b.
Once you’ve installed CFMX7 on the Windows 2003
system, you now stop all CFMX7 services on your windows 2008/2012 system. Set the services to manual start up. Restart your Windows 2008/2012 system.
c.
From the 2008/2012 server, map a drive to the
windows 2003 system. In our example, the
2003 system will be y:.
d.
From the 2008/2012 system, open up a command
prompt using run as administrator. Run
the following commands (adjust parameters as needed)
Robocopy y:\CFusionMX7 c:\CFusionMX7 /e /TEE /w:10 /Log:c:\CFusionMX7Copy.log
Robocopy y:\inetpub\wwwroot\CFIDE c:\inetpub\wwwroot\CFIDE /e /TEE /w:10
/Log:C:\CFIDECopy.log
e.
You can also robocopy other directories, like the
wwwroot\cfdocs directory if you installed the cold fusion documentation, as
needed.
f.
If your drive letters and directory structure
was the same on the win 2003 system, you won’t need to change anything, else.
g.
Otherwise, you will have to run a tool to do a
mass search and replace to adjust the configuration files in your cfroot
directory.
h.
Start up the Cold Fusion services and set them
back to Automatic.
i.
Log into /CFIDE/Administrator/index.cfm and
Click System Information. The Patch
levels should now be the same.
Installing Hot fixes
The Directory browser applet does not seem to work anymore,
so you can’t just upload hot fixes using the System Information Upload
page.
Fortunately, you can copy your hot fix .jar file to:
C:\CFusionMX7\lib\updates
Then, restart CfusionMX7 Application Server.
Configuring DataSources to use Windows Authentication for SQL
Authentication
My new architecture required us to use Windows
Authentication for SQL Authentication, as well.
Downlload the jtds-1.2.8.jar file from http://jtds.sourceforge.net/faq.html.
1)
ColdFusion Services should be running as the
default local System account.
2)
Install the jdbc driver to support windows
authentication, as follows:
a.
Create a C:\CFusionMX7\classpath directory. Copy the jtds-1.2.8.jar file to this
directory.
b.
NOTE: USE jtds-1.2.8.jar not the latest version
(1.3), because the 1.3 version will not work since it was compiled using a
newer version of Java than CFMX, and the connection will merely timeout.
c.
Add C:\CFusionMX7\classpath to the ColdFusion classpath via
CFIDE/Administrator/index.cfm -> Server Settings -> Java and JVM
3)
Restart Cold Fusion Services.
5)
Here are the settings for a Cold Fusion JTDS Datasource, using the DataSource Type of Other.
JDBC
URL:
jdbc:jtds:sqlserver://vserver:1433/DBNAME;domain=DOMAINNAME;useNTLMv2=true;user=DOMAINUSER;password=[DOMAINUsersPASSWORD]
Driver
Class:
net.sourceforge.jtds.jdbc.Driver
Driver name:
jTDS
jTDS
it can work on windows 2016?
ReplyDeleteI haven't tested on Windows 2016. I have since re-written all my Cold Fusion applications and converted them over to ASP.Net, so no further need to get Cold Fusion MX7 running on newer versions of Windows Server.
Delete