|
Deploying ColdFusion 9 on IBM WebSphere
The
following instructions tell you how to deploy ColdFusion 9 on IBM WebSphere
Application Server (WAS) 5.1, 6.1 and Network Deployment (ND).
The following terms refer to WebSphere and ColdFusion directories:
- websphere_root
- The directory in which IBM WebSphere Application Server is installed;
for example, C:\Program Files\WebSphere in Windows, and /opt/WebSphere
in UNIX.
- cf_webapp_root
- The directory to which the ColdFusion web application is deployed;
for example, C:\Program Files\WebSphere\AppServer\installedApps\MyHost\cfusion.ear\cfusion.war
in Windows, and /opt/WebSphere/AppServer/installedApps/MyHost/cfusion.ear/cfusion.war
in UNIX.
- java_home
- The root directory of your Java 2 software development kit
(J2SDK); for example, C:\j2sdk1.4.1.
When you deploy ColdFusion
on an existing version of IBM WebSphere, expand the EAR file or
WAR files manually before deployment.
Expand the EAR fileOpen a
console window, navigate to the directory that contains the EAR
file, and make a new directory named cfusion-ear:
md cfusion-ear (mkdir cfusion-ear on UNIX)
Change to the cfusion-ear directory and expand the cfusion.ear
file with the jar command:
cd cfusion-ear
java_home/bin/jar -xvf ../cfusion.ear
This expands
the cfusion.ear file into cfusion.war and rds.war (rds.war is not included
if you specified a context root of / when you ran the installation wizard).
In cfusion-ear, make a new directory named cfusion-war.
md cfusion-war (mkdir cfusion-war on UNIX)
Change to the cfusion-war directory and expand the cfusion.war
file with the jar command:
cd cfusion-war
java_root/bin/jar -xvf ../cfusion.war
This expands
the cfusion.war file.
(If rds.war exists) Go up one level to cfusion-ear, make
a new directory named rds-war.
cd ..
md rds-war (mkdir rds-war on UNIX)
(If rds.war exists) Change to the rds-war directory and expand
rds.war with the jar command:
cd rds-war
java_root/bin/jar -xvf ../rds.war
This expands rds.war.
Go up one level to the cfusion-ear file, and delete the cfusion.war
and rds.war files:
cd ..
del cfusion.war (rm cfusion.war on UNIX)
del rds.war (rm rds.war on UNIX)
Open
the cfusion-ear/META-INF/application.xml file in a text editor.
Change the web-uri element from cfusion.war
to cfusion-war (or the name of the directory that contains the expanded
cfusion.war file). Change the web-uri element for
rds.war to rds-war. A directory name in the web-uri element
cannot contain a dot.
Save the application.xml file.
On
WebSphere ND, deploying multiple application server clones on a
single computer is commonly referred to as vertical clustering.
Vertical clustering leverages the computer's processing power to
obtain a higher level of efficiency; however, if there is total
computer failure, no application server instances are available.
The applications deployed in a vertical cluster share the same file
system. Deploying the multiple application servers on multiple computers
is commonly referred as horizontal clustering; it provides the highest
level of failover and scaling. The steps you perform to deploy ColdFusion
9 in a clustered environment are the same, regardless of clustering method,
because the WebSphere Network Deployment Manager manages the cluster.
To
use LiveCycle Data Services ES, you must be running WebSphere 5.1.1 Business
Integration.
Deploy ColdFusion 9 on WebSphere 5.1 or 6.1Start the IBM WebSphere Application Server, if
it is not running.
Open the IBM WebSphere Administrative Console, if it is not
running.
Select Applications > Install New Application.
When the Preparing for the Application Installation page
appears, in the text box for the local file system, enter the path
to the EAR file that you installed when you installed ColdFusion;
for example, C:\ColdFusion9\cfusion.ear.
If you are running
the Administrative console from a browser that is not on the same
system on which WebSphere is running, that is, not from localhost,
use the Remote file system option ( Server Path on WebSphere 5.1),
which enables directory browsing on the server file system.
Leave the Context Root box empty and click Next.
Accept the default values on the second Select Installation
Options page (Preparing for the Application Installation on WebSphere
5.1), if appropriate for your WebSphere configuration, and then
click Next.
WebSphere might display an Application Security
Warnings page with a message at the bottom of the page that starts
with "ADMA0080W: A template policy file without any permission set
is included in the 1.2.x enterprise application." You can ignore
this warning.
If you have multiple application servers, select the application
server in which to install the ColdFusion application and RDS support,
and then click Next.
If you selected to install LiveCycle Data Services ES , the
Map Resource References to resources panel appears. Enter wm/default
as the target for the resource wm/MessagingWorkManager.
When the Map Virtual Hosts for Web Modules panel appears,
select the virtual host or hosts in which to install the ColdFusion
9 application and Remote Development Services (RDS) support, and
then click Next.
RDS must be on the same virtual host and
port as ColdFusion 9.
When the Summary panel appears, review the installation configuration,
and then click Finish.
When the Application Adobe ColdFusion 9 Installed Successfully
message appears on the Installing page, select Save To Master Configuration,
and then select Save on the Save page to save your workspace.
If
you changed the application name from the default, the message uses
your application name.
Start the enterprise application named Adobe ColdFusion 9.
Browse to the ColdFusion Administrator to run the Configuration
Wizard.
Note: Copy the version of tools.jar that
the application server uses to the cfusion/lib directory.
Deploy ColdFusion 9 on WebSphere NDStart
the IBM WebSphere Application Server, if it is not running.
Open the IBM WebSphere Administrative Console, if it is not
running.
Select Applications > Install New Application.
When the Preparing for the Application Installation page
appears, in the text box for the local file system, enter the path
to the EAR file that you installed when you installed ColdFusion;
for example, C:\ColdFusion9\cfusion.ear.
If you are running
the Administrative console from a browser that is not on the same
system on which WebSphere is running, that is, not from localhost,
use the Remote file system option ( Server Path on WebSphere 5.1),
which enables directory browsing on the server file system.
Leave the Context Root box empty and click Next.
Accept the default values on the second Select Installation
Options page (Preparing for the Application Installation on WebSphere
5.1), if appropriate for your WebSphere configuration, and then
click Next.
WebSphere might display an Application Security
Warnings page with a message at the bottom of the page that starts
with "ADMA0080W: A template policy file without any permission set
is included in the 1.2.x enterprise application." You can ignore
this warning.
Select the cluster on which to install the ColdFusion application
and RDS support, and then click Next.
If you selected to install LiveCycle Data Services ES , the
Map Resource References to resources panel appears. Enter wm/default
as the target for the resource wm/MessagingWorkManager.
When the Map Virtual Hosts for Web Modules panel appears,
select the virtual host or hosts in which to install the ColdFusion
9 application and Remote Development Services (RDS) support, and
then click Next.
RDS must be on the same virtual host and
port as ColdFusion 9.
When the Summary panel appears, review the installation configuration,
and then click Finish.
When the Application Adobe ColdFusion 9 Installed Successfully
message appears on the Installing page, select Save To Master Configuration,
and then select Save on the Save page to save your workspace.
If
you changed the application name from the default, the message uses
your application name.
Start the enterprise application named Adobe ColdFusion 9.
Browse to the ColdFusion Administrator to run the Configuration
Wizard.
Note: You must copy the version of tools.jar
that the application server uses to the cfusion/lib directory.
Enable sandbox securityDo
the following to ensure that ColdFusion sandbox security secures
Java access to files and network resources:
On the
WebSphere Administrative Console Security > Secure Administration
panel, ensure that the Java 2 Security option is selected.
Click Apply and then click Save.
Add the following lines to the Standard Properties That Can
Be Read By Anyone section of the JVM's security policy file, java.policy.
(For example, this file can be located in C:\Program Files\WebSphere\AppServer\java\jre\lib\security\java.policy):
grant {
permission java.security.AllPermission;
};
Configure operating system-specific binary support in WindowsThis process is required to support the following features
that use binaries that are specific to your operating system:
CFX tags written in C++
Microsoft Access driver with Unicode support
You do
this by configuring the search paths to find the required binary
files, which are located in the cf_webapp_root\WEB-INF\cfusion\lib
directory.
Configure search pathsMake a backup copy of the setupCmdLine.bat file,
located in the websphere_root\AppServer\bin directory.
Open the original file for editing and add the following
on a single line before the line that starts with SET WAS_CLASSPATH:
SET CF_APPS_PATH=cf_webapp_root\WEB-INF\cfusion\lib
Replace cf_webapp_root with
the path to your web application directory; for example, enter the
following:
SET CF_APPS_PATH=%WAS_HOME%\installedApps\%WAS_CELL%\ Adobe_ColdFusion_9.ear\cfusion.war\WEB-INF\cfusion\lib;%WAS_HOME%\installedApps\%WAS_CELL%\ Adobe_ColdFusion_9.ear\cfusion.war\WEB-INF\flex\jars
Add the CF_APPS_PATH variable to the WAS_CLASSPATH by appending
the following text to the path statement:
;%CF_APPS_PATH%
The
WAS_CLASSPATH line should look similar to the following:
SET WAS_CLASSPATH=%WAS_HOME%/properties;%WAS_HOME%/lib/bootstrap.jar;%WAS_HOME%/lib/j2ee.jar;%WAS_HOME%/lib/lmproxy.jar;%WAS_HOME%/lib/urlprotocols.jar;%CF_APPS_PATH%
Save the file.
Add the full path to the cf_webapp_root\WEB-INF\cfusion\lib
directory to the WAS_PATH variable in the setupCmdLine.bat file.
The WAS_PATH line should look similar to the following:
SET WAS_PATH=%WAS_HOME%\bin;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%PATH%;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\java\bin;C:/Program Files/IBM/WebSphere MQ/WEMPS\bin;%CF_APPS_PATH%;
Save the file.
Enable COM support for WindowsYou enable
Component Object Model (COM) support in Windows after installing ColdFusion
9 so that you can use the cfreport tag with Crystal
Reports. COM support is not required for the ColdFusion Report Builder
or any reports that you create with the ColdFusion reporting feature.
Make a backup copy of the setupCmdLine.bat file, which
is located in the websphere_root\AppServer\bin directory.
Open the original file and add the following on a single
line:
SET PATH=%PATH%;cf_webapp_root\WEB-INF\cfusion\jintegra\bin;cf_webapp_root\WEB-INF\cfusion\jintegra\bin\international
Replace cf_webapp_root with
the path to your web application root directory, for example:
SET PATH=%PATH%;%WAS_HOME%\installedApps\%WAS_CELL%\AdobeColdFusion9.ear\cfusion.ear\cfusion.war\WEB-INF\cfusion\jintegra\bin;%WAS_HOME%\installedApps\%WAS_CELL%\Adobe_ColdFusion_9.ear\cfusion.war\WEB-INF\cfusion\jintegra\bin\international
Save the file.
In some cases, you might also have to
do the following to register the Microsoft Type viewer:
Open a console window and go to the cf_webapp_root\WEB-INF\cfusion\lib directory.
Register TypeViewer.dll by issuing the following command:
regsvr32 TypeViewer.dll
Configure operating system-specific binary support for Solaris and LinuxThis
process is required to support CFX tags written in C++ that use
binaries that are specific to your operating system.
You must configure the search paths to find the required binary
files, which are located in the cf_webapp_root/WEB-INF/cfusion/lib
directory.
Configure search pathMake a backup copy of the startServer.sh file,
which is located in the websphere_root/AppServer/bin directory.
The
path specifications in these instructions assume that you deployed ColdFusion
using the standard application name (Adobe ColdFusion 9) and did
not rename the application.
Open the original file, and in the PLATFORM case block, just
above the LD_LIBRARY_PATH or LIBPATH line, add the following entry
on a single, long line:
On Solaris:
CFUSION_APPS_PATH=cf_webapp_root/WEB-INF/cfusion/lib
Replace cf_webapp_root with
the path to your web application root directory; for example:
CF_APPS_PATH="$WAS_HOME"/installedApps/"$WAS_CELL"/
Adobe_ColdFusion_9.ear/cfusion.war/WEB-INF/cfusion/lib
On
Linux:
CF_APPS_PATH=cf_webapp_root/WEB-INF/cfusion/lib
Replace cf_webapp_root with
the path to your web application root directory; for example:
CF_APPS_PATH="$WAS_HOME"/installedApps/"$WAS_CELL"/ Adobe_ColdFusion_9.ear/cfusion.war/WEB-INF/cfusion/lib
Append the CF_APPS_PATH environment variable to the LD_LIBRARY_PATH entry.
The resulting line should be similar to the following:
LD_LIBRARY_PATH="$WAS_LIBPATH":$LD_LIBRARY_PATH:$CF_APPS_PATH
Save the file and restart your WebSphere Application Server.
Enable ColdFusion charting and graphing support for UNIXOpen the WebSphere Administrative Console.
In the left navigation bar, select Node_name > Servers
> Application Servers.
Select your J2EE application server; for example, Server1.
Under Java and Process Management, select Process Definition.
On the Process Definition page, select Java Virtual Machine
in the Additional Properties box.
If you are running ColdFusion 9 on a system without a monitor,
do the following:
In the Additional Properties box
at the bottom of the page, select Custom Properties.
On the Custom Properties page, select New and add a system
property, completing the fields as follows:
Name java.awt.headless
Value true
Click OK.
Save the master configuration file.
Disable RDSFor security reasons, Adobe recommends that you disable
RDS on a production server. If you enable RDS when you install ColdFusion
9, you can disable it at a later time, as the following instructions
describe.
If you disable RDS, the following ColdFusion 9 features do not
work:
The Browse Server button in the ColdFusion Administrator
(for example, on the ColdFusion Mappings page)
The Query Builder and charting in the ColdFusion Report Builder
To disable RDS on UNIX,
Stop ColdFusion.
In the WebSphere Administrative Console, select the Applications
> Enterprise Applications panel, select the Adobe ColdFusion
9 application, and then click Stop.
Do the following in both the cf_webapp_root\WEB-INF\web.xml
and the websphere_root\AppServer\config\cells\NodeName\applications\cf_application_name.ear\
deployments\cf_application_name\cfusion.war\WEB-INF\web.xml files
(or the equivalent paths in UNIX). For example, change the following
files:
To disable RDS on Windows,
Back up the ColdFusion web module web.xml file
(available in either C:\Program Files\WebSphere\AppServer\installedApps\MYNODE\cfusion.ear\cfusion.war\WEB-INF\web.xml
or C:\Program Files\WebSphere\AppServer\config\cells\MYNODE\applications\cfusion.ear\deployments\Adobe
ColdFusion 9\cfusion.war\ WEB-INF\web.xml).
Open the original web.xml file for editing.
Comment out the RDS Servlet definition, as follows:
<!-- <servlet id="coldfusion_servlet_8789"> <servlet-name>RDSServlet</servlet-name> <display-name>RDS Servlet</display-name><servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class> <init-param id="InitParam_103401311065856789"><param-name>servlet.class</param-name> <param-value>coldfusion.rds.RdsFrontEndServlet</param-value></init-param> </servlet> -->
The
text in the servlet definition might vary.
Comment out the RDS Servlet mapping, as the following example
shows:
<!--
<servlet-mapping id="coldfusioon_mapping_9">
<servlet-name>RDSServlet</servlet-name>
<url-pattern>/CFIDE/main/ide.cfm</url-pattern>
</servlet-mapping>
-->
The servlet-mapping id value might vary.
Save the file.
Restart the ColdFusion 9 application.
If your ColdFusion 9 application context root is something
other than /, disable or undeploy the RDS redirector web module
by doing the following:
In the WebSphere Administrative Console, select cell_name
> Applications > Enterprise Applications.
Stop the Adobe ColdFusion 9 application if it is running.
Select Adobe ColdFusion 9 Application, select Manage Modules
and then select the check box for ColdFusion RDS application, and
then click Remove.
Enable web servicesTo enable web services, copy the tools.jar file from the websphere/appserver/java/lib
directory to the cfusion/lib directory.
Apply application server configurationTo apply application server configuration, restart the
application server.
Configure ColdFusion 9Ensure that the following settings and practices are in
place before using WebSphere Application Server ND:
- Event Gateway
- Ensure that the startup mode of the Socket gateway instances is
set to manual. In particular, do not set it to Automatic when using
a vertical cluster. Select one of the instances in the vertical
cluster and start the Socket gateway on that instance manually.
- Session Replication
- Either avoid ColdFusion-specific data types or serialize them
to WDDX and store them in session scope as strings.
ColdFusion
Administrator:
In a vertical cluster environment,
avoid concurrent changes to the same service.
In a horizontal cluster environment, each server has its
own ColdFusion Administrator. You must make changes once per server.
In a vertical cluster environment, the ColdFusion Administrator
scheduled tasks are scheduled on all servers.
- Verity Server
- Only one Verity Search Server can run on each server computer.
ColdFusion
Verity licensing does not allow a ColdFusion cfsearch tag
to search multiple Verity Search Server computers. For a horizontal
cluster to interact with a central Verity Search Server, you must
purchase K2 Enterprise from Verity.
- Solr Server
- Only one Solr Search Server can run on each server computer.
- Compilation
- Use precompiled classes and ensure that the Trusted Cache setting
is enabled.
|