Sunteți pe pagina 1din 160

install.

book Page i Thursday, May 10, 2001 12:59 PM

Installing and
Configuring
ColdFusion Server

ColdFusion Server 5

Macromedia, Inc.
install.book Page ii Thursday, May 10, 2001 12:59 PM

Copyright Notice

© 2001 Macromedia Inc. All rights reserved.


This manual, as well as the software described in it, is furnished under license and may
be used or copied only in accordance with the terms of such license. The content of
this manual is furnished for informational use only, is subject to change without
notice, and should not be construed as a commitment by Macromedia Inc.
Macromedia Inc. assumes no responsibility or liability for any errors or inaccuracies
that may appear in this book.
Except as permitted by such license, no part of this publication may be reproduced,
stored in a retrieval system, or transmitted in any form or by any means, electronic,
mechanical, recording, or otherwise, without the prior written permission of
Macromedia Inc.
ColdFusion and HomeSite are federally registered trademarks of Macromedia Inc,
HomeSite, and the ColdFusion logo are trademarks of Macromedia Inc. in the USA
and other countries. Microsoft, Windows, Windows NT, Windows 2000 Windows 98,
Windows ME, Microsoft Access, and FoxPro are registered trademarks of Microsoft
Corporation. All other products or name brands are the trademarks of their respective
holders. Solaris is a trademark of Sun Microsystems Inc. UNIX is a trademark of The
Open Group. PostScript is a trademark of Adobe Systems Inc.

Part number: ZCF50MINS


install.book Page iii Thursday, May 10, 2001 12:59 PM

Contents

Welcome to ColdFusion Server ................... vii


Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Developer Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
About ColdFusion Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Printed and online documentation set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Viewing online documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Getting Answers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Contacting Macromedia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

Chapter 1 Installing ColdFusion Server in Windows .. 3


Windows System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Before You Begin the Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Required operating system updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Installing SNMP in Windows NT 4.0 Server and Windows 2000 Server . . . 6
Important Network Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Upgrading from a previous version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Verifying that a Web server is running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Removing, modifying, repairing, or updating ColdFusion Server 5 . . . . . . 8
Installing ColdFusion Server in Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
ColdFusion Server services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Configuring Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Configuring Web servers manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Configuring SNMP MIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Changing the ColdFusion Server user account . . . . . . . . . . . . . . . . . . . . . . . 20
What to Do Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
install.book Page iv Thursday, May 10, 2001 12:59 PM

iv

Chapter 2 Installing ColdFusion Server in Solaris ... 23


Solaris System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Before You Begin the Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Required operating system patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Installing SNMP in Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Important Network Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Upgrading from a previous version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Verifying that a Web server is running .............................. 28
Uninstalling ColdFusion Server 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Installing ColdFusion Server in Solaris. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
ColdFusion Server Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Configuring Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Configuring Web servers manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Configuring SNMP MIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Configuring databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
What to Do Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Chapter 3 Installing ColdFusion Server in Linux .... 39


Linux System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Before You Begin the Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Required operating system patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Installing SNMP in Red Hat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Important Network Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Upgrading from a previous version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Verifying that a Web server is running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Uninstalling ColdFusion Server 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Installing ColdFusion Server in Linux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
ColdFusion Server processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Configuring Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Configuring Web servers manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Configuring SNMP MIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Configuring databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
What to Do Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Chapter 4 Installing ColdFusion Server in HP-UX ... 55


HP-UX System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Before You Begin the Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Required operating system settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Upgrading from a previous version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Verifying that a Web server is running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Mounting the installation CD-ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Uninstalling ColdFusion Server 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Installing ColdFusion Server in HP-UX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
install.book Page v Thursday, May 10, 2001 12:59 PM

ColdFusion Server processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61


Configuring Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Configuring Web servers manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Configuring databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
What to Do Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

Chapter 5 Basic ColdFusion Server Administration . 67


Initial Administration Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
The ColdFusion Administrator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Accessing the Administrator remotely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Server Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Client Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Migrating Client Variable Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Memory Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Single threaded sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Variable scope locking settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Mail/Mail Logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Data Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Verity Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Managing collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Verity supported file types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Debug Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Debug Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Debugging IPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Automated Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Automation Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Schedule Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
JVM and Java Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Java Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
CFX Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Custom Tag Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
CORBA Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Basic Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
CF Admin Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Tag Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
CF Studio Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
install.book Page vi Thursday, May 10, 2001 12:59 PM

vi

Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Logs and Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Logging Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Log files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Server Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Chapter 6 Managing Data Sources ............... 109


About ColdFusion Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Supported Database Drivers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
What to do next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Choosing the Correct Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
About ODBC drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
About OLE DB and native drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Adding Data Sources for ColdFusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
ColdFusion Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Verifying ColdFusion Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Connecting to Microsoft SQL Server Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Configuring Microsoft SQL Server Options (Windows) . . . . . . . . . . . . . . . 121
Configuring Microsoft SQL Server Options (UNIX) . . . . . . . . . . . . . . . . . . 122
Connecting to Microsoft Access Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Configuring Microsoft Access Options (Windows) . . . . . . . . . . . . . . . . . . . 123
Tips for connecting to Microsoft Access (Windows) . . . . . . . . . . . . . . . . . . 124
Connecting to Remote Access Data Sources . . . . . . . . . . . . . . . . . . . . . . . . 125
Connecting to Oracle Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Configuring Oracle 7.3.4/8.0.x options (Windows) . . . . . . . . . . . . . . . . . . . 127
Configuring Oracle 7.3.4/8.0.x options (UNIX) . . . . . . . . . . . . . . . . . . . . . . 127
Connecting to Oracle 7.3.4 and 8.0.x databases (UNIX) . . . . . . . . . . . . . . . 128
Connecting to Oracle 8.0.x through ODBC (UNIX) . . . . . . . . . . . . . . . . . . . 130
Troubleshooting the Oracle 7.3.4 native driver (Windows) . . . . . . . . . . . . 131
Configuring the Oracle 8 Client (Windows, UNIX) . . . . . . . . . . . . . . . . . . . 131

Chapter 7 Preparing Your Server for ClusterCATS . 135


Before You Install ColdFusion Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Configuring DNS servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Configuring Web server IP address fail-over . . . . . . . . . . . . . . . . . . . . . . . . 139
Using ClusterCATS dynamic IP addressing . . . . . . . . . . . . . . . . . . . . . . . . . 140
Enabling the STREAMS protocol (Windows NT only) . . . . . . . . . . . . . . . . 140
Configuring firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Analyzing Web server content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Considering domain controllers (Windows NT only) . . . . . . . . . . . . . . . . . 145
After You Install ColdFusion Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
install.book Page vii Thursday, May 10, 2001 12:59 PM

Welcome to ColdFusion Server

Installing and Configuring ColdFusion Server is intended for server administrators


and anyone who is new to ColdFusion Server and needs to install and configure
ColdFusion Server 5.

Contents
• Intended Audience................................................................................................... viii
• New Features ............................................................................................................ viii
• Developer Resources................................................................................................... x
• About ColdFusion Documentation .......................................................................... xi
• Getting Answers ........................................................................................................ xii
• Contacting Macromedia.......................................................................................... xiii
install.book Page viii Thursday, May 10, 2001 12:59 PM

viii Welcome to ColdFusion Server

Intended Audience
Installing and Configuring ColdFusion Server is intended for anyone who needs to
install, configure, and maintain ColdFusion Server 5. It describes:
• System requirements
• Installation processes for all supported operating systems
• Operating system-specific configuration instructions
• Basic configuration options using the ColdFusion Administrator

New Features
The following table lists the new features in ColdFusion 5:

Benefit Feature Description


Breakthrough User-defined functions Create reusable functions to accelerate
productivity development.
Query of queries Easily integrate data from
heterogeneous sources by merging
and querying data in memory using
standard SQL.
Server analysis and Quickly detect and diagnose server
troublshooting errors with built-in server reporting
and the new Log File Analyzer.
Powerful Charting engine Create professional-quality charts and
business graphs from queried data without
intelligence leaving the ColdFusion environment.
capabilities
Enhanced Verity K2 Index and search up to 250,000
full-text search documents and enjoy greater
performance.
Reporting interface for Create professional-quality tabular
Crystal Reports 8.0 reports from queried data and
applications.
Enhanced Core engine tuning Take advantage of dramatically
performance improved server performance and
reduced memory usage to deliver
faster, more scalable applications.
Incremental page Improve response time by delivering
delivery page output to users as it is built.
Wire protocol Deliver high-performance ODBC
database drivers connectivity using new drivers.
install.book Page ix Thursday, May 10, 2001 12:59 PM

New Features ix

Benefit Feature Description


Easy Application deployment Effortlessly and reliably deploy,
managment services archive, or restore entire applications
using ColdFusion archive files.
Enhanced application Keep track of server performance and
monitoring availability with customizable alerts
and recovery.
SNMP support Monitor ColdFusion applications from
enterprise management systems.
Expanded Expanded Linux support Deploy on additional Linux
integration distributions, including SuSE and
Cobalt.
Enhanced hardware load Apply optimized, agent-based support
balancer integration for hardware load balancers,
including new support for the Cisco
CSS 11000.
Enhanced COM support Experience easier integration with
COM components.
install.book Page x Thursday, May 10, 2001 12:59 PM

x Welcome to ColdFusion Server

Developer Resources
Macromedia Corporation is committed to setting the standard for customer support
in developer education, technical support, and professional services. The Web site is
designed to give you quick access to the entire range of online resources, as the
following table describes.

Resource Description URL


Macromedia Web General information about Macromedia
site products and services
Information on Detailed product information on
ColdFusion ColdFusion and related topics
Technical Professional support programs that
Support Macromedia offers.
ColdFusion Access to experienced ColdFusion
Support Forum developers through participation in the
Online Forums, where you can post
messages and read replies on many
subjects relating to ColdFusion.
Installation Support for installation-related issues for
Support all Macromedia products
Professional Information about classes, on-site
Education training, and online courses offered by
Macromedia
Developer All the resources that you need to stay on
Community the cutting edge of ColdFusion
development, including online discussion
groups, Knowledge Base, technical
papers and more
ColdFusion Dev Development tips, articles,
Center documentation, and white papers
Macromedia Connection with the growing network of
Alliance solution providers, application
developers, resellers, and hosting
services creating solutions with
ColdFusion
install.book Page xi Thursday, May 10, 2001 12:59 PM

About ColdFusion Documentation xi

About ColdFusion Documentation


ColdFusion Server documentation is designed to provide support for the complete
spectrum of participants. The print and online versions are organized to allow you to
quickly locate the information that you need. The ColdFusion Server online
documentation is provided in HTML.

Printed and online documentation set


The ColdFusion documentation set consists of the following titles.

Book Description
Installing and Describes system installation and basic configuration for
Configuring Windows, Solaris, Linux, and HP-UX.
ColdFusion Server
Advanced Describes how to connect your data sources to the ColdFusion
ColdFusion Server, configure security for your applications, and how to use
Administration ClusterCATS to manage scalability, clustering, and
load-balancing for your site.
Developing Describes how to use ColdFusion Server to develop your
ColdFusion dynamic Web applications, including retrieving and updating
Applications your data, using structures, and forms.

CFML Reference The online-only CFML Reference provides descriptions, syntax,


usage, and code examples for all ColdFusion tags, functions,
and variables.
CFML Quick A brief guide that shows the syntax of ColdFusion tags,
Reference functions, and variables

Viewing online documentation


ColdFusion documentation in Acrobat format is available on the ColdFusion
product CD-ROM and for download from the ColdFusion Web site: http://
www.coldfusion.com.
install.book Page xii Thursday, May 10, 2001 12:59 PM

xii Welcome to ColdFusion Server

Getting Answers
One of the best ways to solve particular programming problems is to tap into the vast
expertise of the ColdFusion developer communities on the ColdFusion Forums at
http://forums.coldfusion.com. Other developers on the forum can help you figure
out how to do just about anything with ColdFusion Server. The search facility can
also help you search messages from the previous 12 months, allowing you to learn
how others have solved a problem that you might be facing. The Forums is a great
resource for learning ColdFusion, but it is also a great place to see the ColdFusion
developer community in action.
install.book Page xiii Thursday, May 10, 2001 12:59 PM

Contacting Macromedia xiii

Contacting Macromedia

Corporate Macromedia, Inc.


headquarters 600 Townsend Street
San Francisco, CA 4103
Tel: 415.252.2000
Fax: 415.626.0554
Web:

Technical support Macromedia offers a range of telephone and Web-based


support options. Go to http://www.coldfusion.com/support/
for a complete description of technical support services.
You can make postings to the ColdFusion Support Forum
(http://forums.coldfusion.com/DevConf/index.cfm) at any
time.

Sales Toll Free: 888.939.2545


Tel: 617.219.2100
Fax: 617.219.2101
E-mail: sales@macromedia.com
Web:
install.book Page xiv Thursday, May 10, 2001 12:59 PM

xiv Welcome to ColdFusion Server


install.book Page 3 Thursday, May 10, 2001 12:59 PM

Chapter 1

Installing ColdFusion Server


in Windows

This chapter explains how to install and configure ColdFusion Server in Windows.

Contents
• Windows System Requirements................................................................................. 4
• Before You Begin the Installation............................................................................... 5
• Installing ColdFusion Server in Windows ............................................................... 10
• Configuring Your Installation................................................................................... 14
• What to Do Next ........................................................................................................ 21
install.book Page 4 Thursday, May 10, 2001 12:59 PM

4 Chapter 1 Installing ColdFusion Server in Windows

Windows System Requirements


The following table compares the system requirements for the ColdFusion Server
Professional and Enterprise Editions:

ColdFusion ColdFusion
Server Server
Requirement Professional Enterprise
Windows Version
Windows 98 x
Windows NT 4.0 (Workstation and Server) x x
Windows 2000 (Professional*, Server, and x x
Advanced Server)
Hardware
Processor Pentium Pentium
Minimum RAM (MB) 128 256
Recommended RAM (MB) 256 512
Free Hard Disk Space (MB) 200 400
CD-ROM Drive x x
Web Servers
Microsoft Personal Web Server (PWS) x
Microsoft IIS 4.0, 5.0 x x
iPlanet/Netscape Enterprise Server 3.6, 4.1 x x
Apache Server 1.3.x*† x x
O’Reilly WebSite Professional* 2.0, 3.0 x x
WebSite Server API (WSAPI)* x x
* ClusterCATS and Application Management features are not supported on
these platforms.
† ColdFusion Server provides a precompiled module that is binary compat-
ible with versions 1.3.6 through 1.3.19. ColdFusion Server also provides
the files required to build a version of the ColdFusion plug-in module for
a custom version of Apache 1.3.x. For more information, see “Configur-
ing Web servers manually” on page 14.
install.book Page 5 Thursday, May 10, 2001 12:59 PM

Before You Begin the Installation 5

Before You Begin the Installation


This section contains the following pre-installation instructions:
• Required operating system updates
• Installing SNMP in Windows NT 4.0 Server and Windows 2000 Server
• Important Network Considerations
• Upgrading from a previous version
• Verifying that a Web server is running
• Removing, modifying, repairing, or updating ColdFusion Server 5

Required operating system updates


Categorized by Windows version, the following table lists the updates that must be
installed before installing ColdFusion Server 5:

Operating
System Update Where to find it
Windows 98 Service Pack 1 http://www.microsoft.com/downloads/
MDAC 2.5 SP1 http://www.microsoft.com/data/downloads/
MFC/MSVC 6.0 localdrive\ColdFusion
Image\Redistrib\MSVCRT\setup.exe
NT Option Pack http://www.microsoft.com/msdownload/
ntoptionpack/askwiz.asp
Window NT 4.0 Service Pack 6a http://www.microsoft.com/downloads/
MDAC 2.5 SP1 http://www.microsoft.com/data/
download.htm
MFC/MSVC 6.0 localdrive\ColdFusion
Image\Redistrib\MSVCRT\setup.exe
Simple Network Required only for MIB functionality. For
Management instructions, see “Installing SNMP in Windows
Protocol NT 4.0 Server and Windows 2000 Server” on
(SNMP)* page 6 and “Configuring SNMP MIB” on page
19.
Windows 2000 Service Pack 1 http://www.microsoft.com/downloads/
MDAC 2.5 SP1 http://www.microsoft.com/data/
download.htm
MFC/MSVC 6.0 localdrive\ColdFusion
Image\Redistrib\MSVCRT\setup.exe
install.book Page 6 Thursday, May 10, 2001 12:59 PM

6 Chapter 1 Installing ColdFusion Server in Windows

Operating
System Update Where to find it
SNMP† Required only for MIB functionality. For
instructions, see “Installing SNMP in Windows
NT 4.0 Server and Windows 2000 Server” on
page 6 and “Configuring SNMP MIB” on page
36.
* Windows NT 4.0 Server only
† Windows 2000 Server only

Installing SNMP in Windows NT 4.0 Server and Windows 2000


Server
Managed data is accessible in ColdFusion Server 5 Enterprise Edition through the
Simple Network Management Protocol (SNMP) Management Information Base
(MIB) for Advanced ColdFusion Application Management features. You can
integrate this information with your third-party system management tools. These
tools provide a way for you to manage diverse components of your enterprise from a
management station in your network.
If you want to use the ColdFusion Server MIB features, you must install SNMP before
installing ColdFusion Server. For instructions, see the following procedures.

To install the SNMP service in Windows NT 4.0:


1 From the Start menu, select Settings > Control Panel > Network > Service Tab >
Add > SNMP Service.
2 The installation begins. When prompted, insert your Windows installation
CD-ROM.
3 Start the SNMP trap service.

Note
If you chose to overwrite new files during the SNMP installation, you must re-apply
your most recent operating system Service Pack after the SNMP installation because
the SNMP install includes some older files.

To install the SNMP service in Windows 2000:


1 From the Start menu, select Settings > Control Panel > Add/Remove Programs >
Add/Remove Windows Components.
2 Click Management and Monitoring Tools and Details.
3 Select Simple Network Management Protocol, and click OK.
4 To begin the installation, click Next.
install.book Page 7 Thursday, May 10, 2001 12:59 PM

Before You Begin the Installation 7

After finishing the ColdFusion Server installation, you must configure your system to
use the MIB features. For more information, see “Configuring SNMP MIB” on page
19.

Important Network Considerations


The following table includes important considerations to keep in mind when
configuring your network before the ColdFusion Server installation:
• ColdFusion Server must be installed using the same administrator account that
was used to install Windows and IIS.
• The server running ColdFusion Server should not be configured as a Primary
Domain Controller (PDC) or Backup Domain Controller (BDC). Macromedia
follows Microsoft’s network model in which the first level is the PDC/BDC. These
systems only manage the network/domain and are not designed to run
application servers. ColdFusion Server should reside on the second level of
Windows NT and Windows 2000 standalone systems. Standalone servers can
participate in a network/domain.
• In an optimal production environment, each ColdFusion Server application is
hosted on a dedicated server. A database, mail, or other server should not reside
on the same server as ColdFusion Server.
• If you intend to install ClusterCATS, you must first prepare your server. For
instructions, see “Preparing Your Server for ClusterCATS” on page 135.
• Because Windows NT 4.0 Workstation or Windows 2000 Professional handle only
ten TCP/IP connections concurrently, Macromedia does not recommend using
those operating systems in a production environment. Use Window NT 4.0
Server or Windows 2000 Server. In addition, Macromedia does not recommend
using Windows 98 because it is not intended as server platforms.

Upgrading from a previous version


The ColdFusion Server 5 installation upgrades your current version of ColdFusion
Server automatically. However, keep in mind the following important instructions
when upgrading from a previous release of ColdFusion Server:
• If you are upgrading from ColdFusion Server 4.0.1 or an earlier release, you must
uninstall the old version before installing ColdFusion Server 5.
• Using the ClusterCATS Explorer or btcluadm, you must remove cluster member
servers before upgrading them to ColdFusion Server 5. In addition, some
ClusterCATS management operations using the btcluadm utility require a license
key. The license key is "GoColdFusion".
• To continue to use VisiBroker for CORBA connections in ColdFusion Server 5,
copy the libraries bundled with ColdFusion Server 4.5.1 into the appropriate
directory. If you uninstall a previous release of ColdFusion Server before
installing ColdFusion Server 5, these libraries are removed from your system.
Copy the libraries to a safe location before the uninstall.
• If you used Advanced Security policy stores in ColdFusion Server 4.5, you must
import that data into ColdFusion Server 5. The ColdFusion installation
install.book Page 8 Thursday, May 10, 2001 12:59 PM

8 Chapter 1 Installing ColdFusion Server in Windows

automatically detects and exports policy store data to an Extensible Markup


Language (XML) file named smpolicy451export.xml. It is stored in the
\cfusion\database\ directory. To complete the migration process, log into the
ColdFusion Administrator and click on the Advanced Security link. Detailed
instructions are provided for importing the policy store data.

Warning
Before proceeding with the upgrade, backup your ColdFusion Server Web
applications.

Verifying that a Web server is running


Before installing ColdFusion Server, check that your Web server is installed and
running.

To check that your local Web server is running:


Enter the URL for a Web page or site from your local Web server in your browser’s
Address field and press Enter.
For example, if the file myindex.htm is in your Web document root directory, load
the page in your browser using the localhost URL:
http://127.0.0.1/myindex.htm
If your Web server is not running, you will receive an error message.

Removing, modifying, repairing, or updating ColdFusion


Server 5
To remove ColdFusion Server:
Removing ColdFusion Server deletes all program files and related components from
your system.
1 Select Start > Settings > Control Panel > Add/Remove Programs > ColdFusion
Server 5. Click Remove. then Next.
A dialog box displays to confirm the uninstall.
2 To begin the uninstall, click Yes.
When the program completes, restart your system.

To modify ColdFusion Server:


Modifying the ColdFusion server installation installs and uninstalls the components
that you select.
1 Select Start > Settings > Control Panel > Add/Remove Programs > ColdFusion
Server 5. Click Modify, then Next.
install.book Page 9 Thursday, May 10, 2001 12:59 PM

Before You Begin the Installation 9

A dialog box displays a list ColdFusion Server components.


2 Select the components that you want removed or added, and click Next.
When the program completes, restart your system.

To repair/update ColdFusion Server:


Use the Repair/update feature to reinstall a component of ColdFusion Server.
Repairing ColdFusion Server refreshes the Windows registry, reset settings, and
replace missing files.
1 Select Start > Settings > Control Panel > Add/Remove Programs > ColdFusion
Server 5. Click Repair, then Next.
When the program completes, restart your system.
install.book Page 10 Thursday, May 10, 2001 12:59 PM

10 Chapter 1 Installing ColdFusion Server in Windows

Installing ColdFusion Server in Windows


Macromedia recommends that you close all open applications before running the
Setup program. This ensures proper installation of the Merant ODBC 3.7 drivers.
This procedure describes a ColdFusion Server Enterprise Edition installation.

To install ColdFusion Server:


1 Close all open applications.
2 Log into your system using the Local Administrator account.
3 Open the Run dialog and browse to the setup.exe file on the ColdFusion Server 5
CD-ROM or an alternate location. Execute the file.
4 After the Welcome and Licence agreement dialogs, the Customer Information
dialog displays. Enter your information, including the ColdFusion Server license
key. You can find your ColdFusion Server license key on the product box and the
CD-ROM packaging.
The Web Server Selection dialog box displays next.
5 Do one of the following:
If your Web server is already installed, the Install Wizard automatically detects
it. Click the radio button for the Web server that you want ColdFusion Server to
use.
If your Web server is not listed, select Other Server and click Next. For
instructions on manually configuring your Web server to work with ColdFusion
Server, see “Configuring Web servers manually” on page 14.
6 After the Choose Destination Path dialog box, the Select Components dialog
displays:

Select the ColdFusion Server components to install. When you select a


component, a brief description displays in the Description box.
install.book Page 11 Thursday, May 10, 2001 12:59 PM

Installing ColdFusion Server in Windows 11

The following table lists important installation options and considerations for
ColdFusion Enterprise Edition customers:

If You Select Comment


ClusterCATS If you want the server on which you are installing
ClusterCATS to be able to assume the IP address
and HTTP traffic of a failed server in the cluster,
select Web Server (IP) Failover.
ClusterCATS and Application The monitoring, alarms, and hardware
Management together load-balancing features cannot be accessed using
the ColdFusion Administrator. Instead, use
ClusterCATS Explorer.
MIB support You must install Windows SNMP service before
installing ColdFusion. The MIB option is available
only if the SNMP service has been installed before
ColdFusion Server. For instructions, see “Installing
SNMP in Windows NT 4.0 Server and Windows
2000 Server” on page 6 and “Configuring SNMP
MIB” on page 19.

Warning
Because of potential security concerns, the ColdFusion Server team recommends
that you not install the example applications in production environments.

7 After the Assign Password and Confirm Selections dialogs, the Install Wizard
begins copying the ColdFusion Server files to your system.
8 Restart your system.

ColdFusion Server services


The ColdFusion Server installation creates the following services in Windows NT and
Windows 2000:

Service Purpose
ColdFusion Application The main ColdFusion Server service. ColdFusion pages
Server cannot be processed if this service is not running.
ColdFusion Executive Polls the ColdFusion Application Server service and, if it is
not running, restarts it.
ColdFusion Remote Provides security, directory and file browsing, and
Development Service debugging services for ColdFusion Studio.
(RDS)
* Available only in ColdFusion Server Enterprise
install.book Page 12 Thursday, May 10, 2001 12:59 PM

12 Chapter 1 Installing ColdFusion Server in Windows

Service Purpose
SiteMinder Authentication Available only if you select the Advanced Security option
Service* during ColdFusion Server setup. Provides user
authentication services for advanced security.
SiteMinder Authorization Available only if you select the Advanced Security option
Service* during ColdFusion Server installation. Provides access
authorization services for advanced security.
ColdFusion Management Supports ColdFusion Management features, including
Service* Archive/Restore and Server Reporting.
ColdFusion Monitoring Monitors the performance and availability of the
Service* ColdFusion Server, the HTTP server, and probes that are
created. This service supports ClusterCATS and
Application Monitoring.
ColdFusion Graphing Provides a Java runtime required for Macromedia
Server* Generator (cfgraph) support.
ColdFusion Management Provides Repository Management facilities for the
Repository Server* ColdFusion Management Service.
* Available only in ColdFusion Server Enterprise

Starting and stopping ColdFusion Server services


In general, you should stop and restart ColdFusion Server after making changes in
the ColdFusion Administrator that affect a data source or connection parameter,
such as caching, thread count, and so on.

To start and stop a ColdFusion Service in Windows NT 4.0:


• Select Start > Settings> Control Panel > Services.
If a service is running, its status appears as "Started" in the Status column. If it is
not running, no status appears for the service.
− To stop a service, select it and click Stop. You are prompted to verify that you
want to stop the service; click Yes. The Services window refreshes, and the
status of the service is no longer shown as "Started."
− To start a service, select it and click Start. The status of the service appears as
"Started".

To configure ColdFusion Server to startup automatically or manually in


in Windows NT 4.0:
1 Select Start > Settings> Control Panel > Services.
2 Double-click the service that you want to configure. The window for that service
opens.
3 In the Startup Type frame, select either the Automatic or Manual option.
4 To save the configuration, click OK.
install.book Page 13 Thursday, May 10, 2001 12:59 PM

Installing ColdFusion Server in Windows 13

To start and stop a ColdFusion Service in Windows 2000:


• Select Start > Control Panel > Settings > Administrative Tools > Services.
If a service is running, its status appears as "Started" in the Status column. If it is
not running, no status appears for the service.
− To stop a service, select it and click Stop. The Services window refreshes, and
the status of the service is no longer shown as "Started".
− To start a service, select it and click Start. The status of the service appears as
"Started".

To configure ColdFusion Server to startup automatically or manually in


Windows 2000:
1 In the MMC, right-click the service that you want to configure and select
Properties.
2 In the Properties dialog, select the General tab. In the Startup Type drop-down
menu, choose either Manual or Automatic.
3 Click OK.

Running ColdFusion Server in Windows 98


Since Windows 98 does not have a services architecture, ColdFusion Server runs as
two executables:

Executable Purpose
ColdFusion Application The main ColdFusion Server service. ColdFusion pages
Server cannot be processed if this service is not running.
ColdFusion RDS Provides security, directory and file browsing, and
debugging services for ColdFusion Studio.

When ColdFusion Server is running, two icons appear in the task bar. To stop the
ColdFusion Application Server executable, right-click the IDE service icon. To run
ColdFusion Server at startup, place a shortcut for the ColdFusion Server icon in the
Startup program group.
install.book Page 14 Thursday, May 10, 2001 12:59 PM

14 Chapter 1 Installing ColdFusion Server in Windows

Configuring Your Installation


After installing ColdFusion Server, you may have to perform the following actions:
• Configuring Web servers manually
• Configuring SNMP MIB
• Changing the ColdFusion Server user account

Configuring Web servers manually


If you selected Other Server in the Web Server Selection dialog, or your Web server
was not detected by the Install Wizard, you must manually configure it. This section
explains how to do this in Windows NT and Windows 2000. The instructions assume
ColdFusion Server is installed in c:\cfusion.
This section explains how to configure these Web servers:
• Internet Information Services (IIS)
• Apache Web server
• Netscape/iPlanet Enterprise Web Server
• O’Reilly WebSite Professional

Internet Information Services (IIS)


The following procedure uses Windows 2000 Professional as the example operating
system. The steps for Windows NT 4.0 are similar.

Tip
If you run ColdFusion Server on Windows 2000 with IIS5, you can improve
performance as follows: open the Internet Services Manager, right-click Default Web
Site, and select Properties. On the Home Directory tab, select Low (IIS Process) in the
Application Protection drop-down list, and click Apply. Stop IIS Admin and all Web
services from the Windows NT Control Panel, and then restart IIS.

To configure IIS for ColdFusion Server:


1 Start the Microsoft Management Console (MMC) by selecting Start > Programs >
Administrative Tools > Computer Management.
install.book Page 15 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 15

The MMC displays:

2 In the Tree tab, under the Internet Information Services tree, right-click your
Web site and select Properties.
The Properties dialog box displays:

3 Click the Home Directory tab, then Configuration.

Note
If the Configuration button is greyed out, click Create, then click Configuration.
install.book Page 16 Thursday, May 10, 2001 12:59 PM

16 Chapter 1 Installing ColdFusion Server in Windows

The Application Configuration dialog box displays:

4 In the App Mappings tab, select entries for.cfm and .dbm, and click Remove.
5 Click Add.
The Add/Edit Application Extension Mappings dialog box displays:

6 Click Browse and go to c:\cfusion\bin\iscf.dll. Enter .cfm in the Extension text


box, and verify that the Script engine check box is selected. Click OK.
7 Repeat Step 6, substituting .dbm for the extension.

Note
In previous versions, ColdFusion Server used the .dbm file extension for
ColdFusion Server files. Macromedia recommends that you rename templates
that have a .dbm extension to .cfm.

8 Click OK in the Application Configuration dialog box to save your changes.


install.book Page 17 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 17

Apache Web server


This procedure assumes that the Apache Web server is installed in c:\Apache.

To configure Apache for ColdFusion Server:


1 If it is not already installed, download the Apache Web server from the Apache
HTTP Server Project Web site at http://www.apache.org/. Read the Windows
documentation at http://www.apache.org/docs/windows.html.
2 If a version of the Apache Web server is running, shut down the Web server.
3 Copy the cfusion\bin\ApacheModuleColdFusion.dll module to your Apache
modules directory.
For example: c:\Apache\modules\ApacheModuleColdFusion.dll.
4 Edit the Apache configuration file (c:\Apache\conf\httpd.conf). Add this line:
LoadModule coldfusion_module modules/ApacheModuleColdFusion.dll
5 Restart the Apache Web server.

Netscape/iPlanet Enterprise Web Server


Manually configuring Netscape/iPlanet Web servers for ColdFusion Server requires
modifying two files, obj.conf and mime.types, in the Netscape/iPlanet Web server
directory, such as c:\netscape\server4\https-yourserver.com\config.

Warning
Ensure that you do not alter files in the backup or install directories.

To configure Netscape/iPlanet for ColdFusion Server:


1 Make a backup copy of the obj.conf file.
2 Insert the following line at the top of the obj.conf file:
Init fn="load-modules" funcs="DoCFRequest" shlib="C:/CFUSION/Bin/
NS4CF.DLL"
3 Look for the following line in the same obj.conf file:
Service method =(GET|HEAD) type="magnus-internal/imagemap"
fn="imagemap"
After this line, insert the following line:
Service fn="DoCFRequest" method="(GET|POST)" type="magnus-internal/
cold-fusion"
4 Make a backup copy of the mime.types file, which is located in the same
directory as the obj.conf file.
5 Insert the following line to the mime.types file:
type=magnus-internal/cold-fusion exts=dbm,cfm,dbml,cfml
6 Go into the Netscape Administrator, and save the changes.
install.book Page 18 Thursday, May 10, 2001 12:59 PM

18 Chapter 1 Installing ColdFusion Server in Windows

Note
Netscape is case sensitive, so add the lines exactly as they appear here . Enter
each command one line. If you remove ColdFusion Server, you must undo these
changes. Otherwise, the iPlanet/Netscape Web server will not work.

O’Reilly WebSite Professional


This example uses Windows 2000 Professional as the example operating system and
O’Reilly WebSite Professional 3.0 as the Web server.

To configure O’Reilly WebSite Professional for ColdFusion Server:


1 Select Start > Programs > WebSite Professional > Server Properties.
The WebSite Pro Server Properties dialog box displays:

2 In the Mapping tab, click Associations in the Mapping Types box.


a In the File Extension text box, enter .cfm.
b In the File Extension text box, click Browse; go to c:\cfusion\bin\WSCF.DLL.
Click Add.
c Repeat Step 2, substituting .dbm.
d Click Add.
The .cfm and .dbm mappings display in the File Extension box.
3 In the Mapping tab, in the Mapping Types box, click Content Types.
a In the File Extension text box, enter .cfm and .dbm.
b In the Media or Server-Side Content text field, enter wwwserver/wsapi.
c Click Add.
install.book Page 19 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 19

Configuring SNMP MIB


To use the ColdFusion Server MIB features, you must configure these settings:
1 For each system, such as a system with the IP address 192.178.64.88, that is to
receive trap messages from the local host, open the local host’s Registry to:
\\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Paramete
rs\TrapConfiguration\public
For each system, add a value in the following form:
1: REG_SZ:192.178.64.88
2 Open the Debug Options page of the ColdFusion Administrator, and ensure that
the Enable Performance Monitoring checkbox is selected.

Tip
You can find a copy of the MIB definition in CFusion/cfam/Database/lhmib.mib.

Using HTTPS and non-default ports


To use HTTPS, a different Web server name, or a different port to access the Web
document root for ColdFusion MIB information, modify <installdir>/cfam/
Database/mib.properties
For example, this file usually contains a single entry, such as http://maine where
maine is the local host name, and http://maine is the Web document root for the
ColdFusion MIB information. To use HTTPS, a different Web document root
(maine1), and port (459), edit the entry to https://maine1:459.
install.book Page 20 Thursday, May 10, 2001 12:59 PM

20 Chapter 1 Installing ColdFusion Server in Windows

Changing the ColdFusion Server user account


By default, ColdFusion Server runs under the host’s System account. However,
under this account, ColdFusion application pages may have access rights to interact
with remote data sources, other application pages, and COM objects.
You may have to run ColdFusion Server under a account that provides the necessary
access rights. These instructions use Windows 2000 Professional operating system.

To change the ColdFusion Server user account:


1 Start the MMC by selecting Start > Programs > Administrative Tools > Computer
Management.
a In the Tree tab, expand Services and Applications and select Services.
b Right-click ColdFusion Application Server and select Properties.
The ColdFusion Application Server Properties dialog box displays:

2 Select the Log On tab. Click This account. Enter appropriate account
information.
3 Click OK to apply the changes.
Restart ColdFusion Server services.

Warning
Do not rename your Windows Administrator account. It causes problems with
security policies and profiles.
install.book Page 21 Thursday, May 10, 2001 12:59 PM

What to Do Next 21

What to Do Next
After installing ColdFusion Server and configuring your installation, you must
perform some initial administration tasks using the ColdFusion Administrator,
ColdFusion Server’s Web-based control console. For more information, see “Initial
Administration Tasks” on page 68.
install.book Page 22 Thursday, May 10, 2001 12:59 PM

22 Chapter 1 Installing ColdFusion Server in Windows


install.book Page 23 Thursday, May 10, 2001 12:59 PM

Chapter 2

Installing ColdFusion Server


in Solaris

This chapter explains how to install and configure ColdFusion Server in Solaris.

Contents
• Solaris System Requirements ................................................................................... 24
• Before You Begin the Installation............................................................................. 25
• Installing ColdFusion Server in Solaris.................................................................... 29
• Configuring Your Installation................................................................................... 33
• What to Do Next ........................................................................................................ 38
install.book Page 24 Thursday, May 10, 2001 12:59 PM

24 Chapter 2 Installing ColdFusion Server in Solaris

Solaris System Requirements


The following table contains the system requirements for the ColdFusion Server
Enterprise Edition:

ColdFusion
Requirement Server Enterprise
Solaris Version
Solaris 2.6, 7, 8 x
Hardware
Processor SPARC
Minimum RAM (MB) 256
Recommended RAM (MB) 512
Free Hard Disk Space (MB) 350
CD-ROM Drive x
Web Server
iPlanet/Netscape Enterprise Server 3.6, 4.1 x
Apache Server 1.3.x* x
* ColdFusion Server provides a precompiled module that is binary compat-
ible with versions 1.3.6 through 1.3.19. ColdFusion Server also provides
the files required to build a version of the ColdFusion plug-in module for
a custom version of Apache 1.3.x. For more information, see “Configur-
ing Web servers manually” on page 33.
install.book Page 25 Thursday, May 10, 2001 12:59 PM

Before You Begin the Installation 25

Before You Begin the Installation


This section contains the following pre-installation instructions:
• Required operating system patches
• Installing SNMP in Solaris
• Important Network Considerations
• Upgrading from a previous version
• Verifying that a Web server is running
• Uninstalling ColdFusion Server 5

Required operating system patches


The following table lists the patches and packages that must be installed before
installing ColdFusion Server 5:

Operating
System Patch Description
Solaris 2.6 105181-17 or higher Kernel patch
105591-09 or higher LibC: Shared library patch for C++
105210-25 or higher LibC: Shared library patch for C/C++
105568-14 or higher libthread: Shared library patch
Solstice Enterprise Required only for MIB functionality. For
Agent (SEA) Runtime instructions, see “Installing SNMP in Solaris”
1.0.3 on page 26.
Solaris 7 106541-08 or higher Kernel patch
106327-08 or higher LibC: Shared library patch for C++
106980-07 or higher libthread: Shared library patch
107709-10 or higher Required only for MIB functionality. For
instructions, see “Installing SNMP in Solaris”
on page 26.
Solaris 8 108869-03 or higher Required only for MIB functionality. For
instructions, see “Installing SNMP in Solaris”
on page 26.
en_US locale U.S. English language pack

Note
All versions of Solaris require the SUNWxcu4 -- XCU4 Utilities package. To download
all patches and packages, go to http://sunsolve.sun.com.
install.book Page 26 Thursday, May 10, 2001 12:59 PM

26 Chapter 2 Installing ColdFusion Server in Solaris

Installing SNMP in Solaris


Managed data is accessible in ColdFusion Server 5 Enterprise Edition through the
Simple Network Management Protocol (SNMP) Management Information Base
(MIB) for Advanced ColdFusion Application Management features. You can
integrate this information with your third-party system management tools. These
tools provide a way for you to manage diverse components of your enterprise from a
management station in your network.
If you want to use the ColdFusion Server MIB features, you must install SNMP before
installing ColdFusion Server. For instructions, see the following procedures.

To install SNMP in Solaris 2.6:


1 Download the Solstice Enterprise Agent (SEA) 1.0.3 Runtime from:
http://www.sun.com/software/entagents/download/
1 Uninstall the following components from your system:
pkgrm SUNWsacom
pkgrm SUNWmibii
pkgrm SUNWsadmi
pkgrm SUNWsasnm
2 Install the SEA Runtime by performing the following steps:
a Uncompress the SEA file by entering the following command:
uncompress solaris2.6-sparc-rt.tar.Z
tar -xvf solaris2.6-sparc-rt.tar
b Install the SEA packages, in sequence, as follows:
pkgadd -d . SUNWmibii
pkgadd -d . SUNWsasnm
pkgadd -d . SUNWsadmi
pkgadd -d . SUNWsacom

Note
For more information on installing the SEA packages, see Chapter 2, "Installing
Solstice Enterprise Agent" in the SEA User Guide Release 1.0 (docs/UGhtml/
install_solaris.doc.html).

3 Apply Solaris patch 106787-12 or higher.


4 Restart the SNMP process.

To install SNMP in Solaris 7 and 8:


• For Solaris 7. install Solaris patch 107709-10 or higher
• For Solaris 8. install Solaris patch 108869-03 or higher
After installing the ColdFusion Server, you must configure your system to use the
MIB features. For more information, see “Configuring SNMP MIB” on page 36.
install.book Page 27 Thursday, May 10, 2001 12:59 PM

Before You Begin the Installation 27

Important Network Considerations


The following table includes important considerations to keep in mind when
configuring your network before the ColdFusion Server installation:
• To install and configure Advanced Security for ColdFusion Server, you must have
an installed, running LDAP server available on your network. You must have the
Directory Manager DN, password, IP/port, and Root DN for this server.
• If you intend to install ClusterCATS, you must first prepare your cluster. For
instructions, see “Preparing Your Server for ClusterCATS” on page 135.
• ClusterCATS requires that the group btcats exist. It attempts to create this group
during the ColdFusion installation using groupadd. If you are using NIS or NIS+,
ensure that either nsswitch.conf allows for group resolution from the group file,
or the group btcats gets created in NIS/NIS+ before installing ClusterCATS.
• In an optimal production environment, each ColdFusion Server application is
hosted on a dedicated server. A database, mail, or other server reside on the same
server as ColdFusion Server.
• Note the location and version number of your installed Web server. The pkgadd
utility prompts you for this information.

Upgrading from a previous version


The ColdFusion Server 5 installation upgrades your current version of ColdFusion
Server automatically. However, keep in mind the following important instructions
when upgrading from a previous release of ColdFusion Server:
• If you are upgrading from ColdFusion Server 4.0 or earlier, you must first run the
registry migration utility cfregup.sh to preserve your registry settings. You must
uninstall the old version by running the pkgrm utility. For details, see the
README.cfregup file.
• If you are upgrading from ColdFusion 4.5, depending on the installation defaults
of your pkgadd utilities, you may have to edit the package installation defaults file
before running the pkgadd utility. This file is located at /var/sadm/install/admin/
default. Change the value of the instance from quit or unique to overwrite. THis
lets the new version of ColdFusion Server overwrite the existing version.
• Using ClusterCATS Explorer or btcluadm, you must remove cluster member
servers before upgrading them to ColdFusion Server 5. ALso, some ClusterCATS
management operations using the btcluadm utility require a license key. The
license key is "GoColdFusion".
• To continue to use VisiBroker for CORBA connections in ColdFusion Server 5,
copy the libraries bundled with ColdFusion Server 4.5.1 into the appropriate
directory. If you uninstall a previous release of ColdFusion Server before
installing ColdFusion Server 5, these libraries are removed from your system.
Copy the libraries to a safe location before the uninstall.

Note
Before proceeding with the upgrade, backup your ColdFusion Server Web
applications.
install.book Page 28 Thursday, May 10, 2001 12:59 PM

28 Chapter 2 Installing ColdFusion Server in Solaris

Verifying that a Web server is running


Before installing ColdFusion Server, ensure that your Web server is installed and
running.

To check that your local Web server is running:


Enter the URL for a Web page or site from your local Web server in your browser’s
Address field and press Enter.
For example, if the file myindex.htm is in your Web document root directory, load
the page in your browser using the localhost URL:
http://127.0.0.1/myindex.htm
If your Web server is not running, you will receive an error message.

Uninstalling ColdFusion Server 5


Use the pkgrm utility to remove an installed version of ColdFusion Server.

Note
The uninstall script removes your odbc.ini file and all Verity collections. To
preserve them, copy them to a new location before uninstalling ColdFusion Server.

To uninstall ColdFusion Server:


1 Log in as root.
2 Enter the following command at the prompt:
pkgrm cfusion
3 ColdFusion Server is deleted from your system.
install.book Page 29 Thursday, May 10, 2001 12:59 PM

Installing ColdFusion Server in Solaris 29

Installing ColdFusion Server in Solaris


The installation procedure assumes that you are installing from a CD-ROM. If you
purchased and downloaded ColdFusion Server, first place the package file
(coldfusion-50-solaris.pkg) into its own directory. To start the installation process,
use the pkgadd -d coldfusion-50-solaris.pkg shell command and then follow
the install procedure below, substituting the location to which you downloaded
ColdFusion Server for references to the CD-ROM.
This procedure describes a ColdFusion Server Enterprise Edition installation.
By default, the package file installs ColdFusion Server in the /opt directory. To install
into a different directory, you must create the directory before running pkgadd.
1 Log in as root.
2 If you are installing from a CD-ROM, copy the gziped tar file, using the
coldfusion-50-solaris.tar.gz command, to a directory on your local disk. Using
gunzip, uncompress the ColdFusion Server tar file with the following command:
coldfusion-50-solaris.tar.gz.
3 Untar the resulting tar file by entering the following command:
tar -xvf coldfusion-50-solaris.tar
4 Using the cd command, go to the resulting directory:
cd coldfusion-50-solaris
5 Run the following pkgadd command:
pkgadd -d coldfusion-50-solaris.pkg
6 At the prompt, enter cfusion and press Enter.
7 Enter the ColdFusion Server registration ID (license key) when prompted.

Note
You can find your ColdFusion Server license key on the product box and the
CD-ROM packaging.

8 After entering the install directory for ColdFusion Server, the installation process
prompts you to enter the name of your Web server.

Note
If you entered Other or if you have a custom release of Apache, such as usr/local/
apache, see “Configuring Web servers manually” on page 33.

At the corresponding prompt, press Enter to let the installation script


automatically configure your Web server.
install.book Page 30 Thursday, May 10, 2001 12:59 PM

30 Chapter 2 Installing ColdFusion Server in Solaris

9 You are prompted to enter y to install the ColdFusion Server options. For each
option that you want to install, enter y. The following table describes the options:

Option Description
Reporting and Accessed through the ColdFusion Administrator, this option
Archive/ provides ColdFusion application reporting statistics and the ability
Deploy to archive and deploy ColdFusion applications.
Monitors, Accessed through the ColdFusion Administrator, this option
Alarms, and provides ColdFusion application performance monitoring,
Load-Balancer threshold alarms, and hardware load-balancing integration for
Integration Cisco LocalDirector. If you select ClusterCATS, these features is
provided through the ClusterCATS Web Administrator.
ClusterCATS Provides software-based load-balancing and IP failover support
for ColdFusion Server. If you want the server on which you install
ClusterCATS to be able to assume the IP address and HTTP
traffic of a failed server in the cluster, enter y to configure this
server with failover services. For more information, see
“Preparing Your Server for ClusterCATS” on page 135.
SNMP MIB Provides application information to third-party applications. You
must install SNMP on Solaris before installing ColdFusion Server.
For instructions, see “Installing SNMP in Solaris” on page 26 and
“Configuring SNMP MIB” on page 36.

10 After supplying the directory for your Web server documentation, entering and
confirming passwords for the ColdFusion Administrator and ColdFusion Studio,
your are prompted to install Advanced Security. To do this, you must have a
functioning LDAP server for policy storage.
Solaris customers currently using Advanced Security in ColdFusion Server 4.5
encounter a question during installation as to whether SiteMinder is installed.
This is referring to the full, retail version of Netegrity SiteMinder, and it enables
ColdFusion Single Sign-On support in ColdFusion automatically. For details on
this, see your Netegrity SiteMinder documentation.
You are prompted for a target LDAP server instance to migrate the SiteMinder
policy store. ColdFusion Server 5 requires that you do so. This one-time
procedure requires a second, properly-configured LDAP server instance. At the
end of the migration procedure, the install automatically configures Advanced
Security to use this second LDAP instance as the SiteMinder policy store.
11 Select whether to install ColdFusion Server documentation and examples. The
documentation is installed in the /cfdocs directory, under the Web root
directory.

Warning
Because of potential security concerns, the ColdFusion Server team recommends
that you not install the example applications in production environments.
install.book Page 31 Thursday, May 10, 2001 12:59 PM

Installing ColdFusion Server in Solaris 31

12 Enter the user name under which ColdFusion Server runs, or press Enter to run
under the default user name ("nobody").
13 Press Enter to begin the installation.
When the installation is complete, a shell script restarts the Web server and starts
ColdFusion Server services. If the ColdFusion Server services are not started
automatically, you can start them manually using the ColdFusion Server start-up
script, which is located in the coldfusion/bin directory.

ColdFusion Server Processes


The ColdFusion Server installation creates the following processes in Solaris:

Process Purpose
cfexec Starts/stops the other processes and manages page scheduling
cfserver The main ColdFusion Server service. ColdFusion pages cannot
be processed if this service is not running.
cfrdsservice Provides system support for the Administrator as well as
security and debugging services for ColdFusion Studio
cfsecurityproxy Links ColdFusion Server to the SiteMinder system
smservauth Provides SiteMinder authentication service
smservaz Provides SiteMinder authorization service
java Provides a runtime for the ColdFusion Server graphing and
charting features and application management features
ipaliasd Provides IP failover capability for ClusterCATS
reqmgr Processes ClusterCATS operations as root
ccmgr Creates processes to support ClusterCATS
wsprobe Probes the application server for load and restarts
unresponsive Web servers
CANamingAdapter Controls the data store for application management features
dfp Provides load-balancing information to LocalDirector

Starting and stopping ColdFusion Server processes


In general, you should stop and restart ColdFusion Server after making changes in
the ColdFusion Administrator that affect a data source or connection parameter,
such as caching or thread count.
ColdFusion Server provides two scripts for starting and stopping ColdFusion Server
processes manually in Solaris:
/opt/coldfusion/bin/start
/opt/coldfusion/bin/stop
install.book Page 32 Thursday, May 10, 2001 12:59 PM

32 Chapter 2 Installing ColdFusion Server in Solaris

In addition, ColdFusion Application Manager provides two scripts for starting and
stopping ClusterCATS and the Application Manager:
/opt/coldfusion/bin/cfam-start
/opt/coldfusion/bin/cfam-stop

Note
To run scripts, you must be logged in with root privileges.

ColdFusion Server also provides the following scripts to start and stop ColdFusion
Server during system startup and shutdown:

Script Function
/etc/init.d/coldfusion Starts or stops ColdFusion Server
/etc/rc1.d/K19coldfusion Stops ColdFusion Server during system shutdown
/etc/rc3.d/S25coldfusion Starts ColdFusion Server during system startup
/etc/init.d/btccmgr start Starts ClusterCATS and application management
processes.
/etc/init.d/btccmgr Stops ClusterCATS and application management
restart processes.
install.book Page 33 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 33

Configuring Your Installation


After installing ColdFusion Server, you may have to perform the following actions:
• Configuring Web servers manually
• Configuring SNMP MIB
• Configuring databases

Configuring Web servers manually


If you did not instruct ColdFusion Server to configure your Web server automatically
during the ColdFusion Server installation, you must manually configure your Web
server. This section explains how to do this in Solaris. The following Web servers are
described in this section:
• Netscape/iPlanet Web Server
• Apache Web Server

Netscape/iPlanet Web Server


The ColdFusion Server NSAPI plug-in has been tested with Netscape/iPlanet
Enterprise Web Server 3.6 and 4.0 and the Netscape FastTrack Web Server 3.6 and
4.0. The ColdFusion Server installation script configures these servers automatically.

The Netscape/iPlanet plug-in


The Netscape/iPlanet plug-in (coldfusion35.so) for ColdFusion Server is in the /opt/
coldfusion/webserver/nsapi directory.
The following procedure assumes that you installed the Netscape/iPlanet server in /
usr/netscape/server4 on the system named smurf.

To configure the Netscape/iPlanet plug-in:


1 Copy the plug-in to a directory in your server directories. Name it coldfusion.so.
mkdir /usr/netscape/server4/plugins/coldfusion
cp /opt/coldfusion/webserver/nsapi/coldfusion35.so \
usr/netscape/server4/plugins/coldfusion/coldfusion.so
2 In the /usr/netscape/server4/https-smurf/config/mime.types file, add a
new ColdFusion Server type. To do this, add the line:
type=magnus-internal/cold-fusion exts=exts=cfm,dbm,cfml,dbml
3 Edit the /usr/netscape/server4/https-surf/config/obj.conf file to add a
service and init directives. Add all of the following syntax on one line:
Init fn="load-modules" shlib="/usr/netscape/server4/
plugins/coldfusion/coldfusion.so" funcs="DoCFRequest"
4 Add the following line in the default Object:
Service fn="DoCFRequest" method="(GET|POST)"
type="magnus-internal/cold-fusion"
install.book Page 34 Thursday, May 10, 2001 12:59 PM

34 Chapter 2 Installing ColdFusion Server in Solaris

5 Stop and restart the Web server.

Note
If you run the Netscape/iPlanet Server Manager, the browser-based
administrator, you may get a warning about edits to the Netscape configuration
files. This is normal. To reload the new configuration files, follow the instructions
and click Apply

Apache Web Server


ColdFusion Server has been tested with Apache version 1.3.6. To download Apache,
go to the Apache Web site at http://www.apache.org.
ColdFusion Server includes a precompiled binary module for Apache,
mod_coldfusion_so, that was tested with Apache 1.3.6 through 1.3.19. This module
works with most versions of Apache. To compile another version of Apache, see the
Apache Readme file at /opt/coldfusion/webserver/apache/readme.

Adding the ColdFusion Server module to Apache 1.3.x


You can find the ColdFusion Server module in the installation directory (usually
/opt) under the coldfusion/webserver/apache directory. The prebuilt module
shipped with ColdFusion Server 5 is built with Apache 1.3.6.
This module does not work with earlier Apache 1.3.x versions, and it may not work
with later versions, if Apache Group changes MODULE_MAGIC_NUMBER_MAJOR
(src src/include/ap_mmn.h in the Apache source).
The module provided with ColdFusion Server should work with most versions of
Apache, but if you have a custom distribution of Apache, you must build your own
version of Apache. With a C compiler (gcc or SUN cc) , you can build a version of
mod_coldfusion.so that should work with a version of Apache 1.3.x. For more
information, see the Readme file in /opt/coldfusion/webserver/apache.
To make the Apache HTTPD load the ColdFusion Server module at startup, you must
configure the mod_so module. This module is not built into Apache by default.
To determine whether the HTTD module is available, run the httpd -1 command. If
the module is present, mod_so.c displays in the list of compiled-in modules. For
more information, see the Apache documentation (README.DSO).

To configure and add the ColdFusion Server module for Apache:


1 Configure this module into the Apache build by running this command:
$ ./configure --enable-module=so <other apache options>
$ make
$ make install
2 If you use gcc to compile Apache, include these environment variables for
configure:
$ env LIBS=/usr/lib/libC.so.5 CFLAGS=-fPIC \
./configure --enable-module=so <other apache options>
install.book Page 35 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 35

After you configure mod_so in your Apache binary, the simplest way to configure the
ColdFusion Server module is to use the apxs program that is included in the Apache
distribution. It installs by default in <apachedir>/apache/bin. This is a Perl script, so
you must have Perl installed on your system. Perl is available at http://
www.perl.com.

To use the apxs program:


1 Ensure that Perl is available in /usr/local/bin/perl.
2 Ensure a C compiler is in your PATH.
3 Add the apache/bin directory to your path:
csh:
set path=($path /usr/ccs/bin /usr/local/apache/bin)
sh/ksh:
PATH=$PATH:/usr/ccs/bin:/usr/local/apache/bin
export PATH
4 Change to the apache/src directory in the ColdFusion Server installation.
cd /opt/coldfusion/webserver/apache/src
5 Run the apxs command to build mod_coldfusion.so by entering this command:
make
6 Run the apxs command to add the module to the Apache configuration by
entering this command:
make install
7 Restart your Apache server by entering this command:
apachectl restart

To configure the Apache module that ColdFusion Server provides for


Solaris:
1 Copy the ColdFusion Server module to the Apache modules directory:
cp /opt/coldfusion/webserver/apache/mod_coldfusion.so /usr/local/
apache/libexec
2 Edit your httpd.conf file to include this directive:
LoadModule coldfusion_module libexec/mod_coldfusion.so

Note
If you have a ClearModuleList directive in httpd.conf, you must add this directive
to the AddModule list, as stated by the comments in the httpd.conf file:
AddModule mod_coldfusion.c

3 Restart Apache.
install.book Page 36 Thursday, May 10, 2001 12:59 PM

36 Chapter 2 Installing ColdFusion Server in Solaris

Configuring SNMP MIB


To use the ColdFusion Server MIB features, you must configure the following
settings.

To configure Solaris use the MIB Agent:


1 Stop the SNMP process by entering the following command:
/etc/init.d/init.snmpdx stop
kill -9 <the pid of the allaire_mibd process>
2 In the file /etc/snmp/conf/allaire_mib.acl, find the following section:
trap = {
{
trap-community = public
hosts = localhost
{
enterprise = "allaire"
trap-num = 1, 2, 3, 4
}
}
}
Change localhost to point to the server(s) that are to receive trap messages from
the local host. If two or more servers should receive traps, the line should be in
the format:
hosts = host1, host2
The system names must be valid on your network (you must be able to ping them
from the local host). If the system names are invalid, the MIB does not work
correctly and the MIB log file grows very large. Do not delete or comment out the
trap section of allaire_mib.acl.
3 Restart the SNMP process by entering the following command:
/etc/init.d/init.snmpdx start
4 Go to the Debug Options page of the ColdFusion Administrator, and ensure that
the Enable Performance Monitoring checkbox is selected.

Configuring the MIB Agent for HTTPS and non-default ports


To use HTTPS, a different Web server name, or a different port to access the Web
document root for ColdFusion MIB information, modify the content of /usr/lib/
btcats/database/mib.properties file.
This file usually contains one entry, such as http://maine , where maine is the local
host name, and http://maine is the Web document root directory of the ColdFusion
MIB information. To use HTTPS, a different Web document root (maine1), and port
(459), edit the entry to https://maine1:459.

Tip
You can find the MIB definition in /usr/lib/btcats/database/lhmib_UNIX.mib.
install.book Page 37 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 37

Configuring databases
After the install has completed, but before you can setup data sources in the
ColdFusion Administrator, you must edit the /opt/coldfusion/bin/start script to
include information about your database(s).
Normally this requires two changes per database: setting a database-specific
environment variable, and adding the path to the client-side database libraries to
your LD_LIBRARY_PATH environment variable. Examples are provided in the start
script to help you.
After editing the start script, you must stop and restart ColdFusion Server for the
changes to take effect. Then use ColdFusion Administrator to set up your data
sources.

Note
ColdFusion Server no longer supports OpenIngres database drivers on Solaris.

Note
For more information on configuring data sources for ColdFusion Server, see
“Managing Data Sources” on page 109. Also, see the ODBC 3.7 documentation PDF
file in /opt/coldfusion/odbc/doc/odbcref.pdf.
install.book Page 38 Thursday, May 10, 2001 12:59 PM

38 Chapter 2 Installing ColdFusion Server in Solaris

What to Do Next
After installing ColdFusion Server and configuring your installation, you must
perform some initial administration tasks using the ColdFusion Administrator,
ColdFusion Server’s Web-based control console. For more information, see “Initial
Administration Tasks” on page 68.
install.book Page 39 Thursday, May 10, 2001 12:59 PM

Chapter 3

Installing ColdFusion Server


in Linux

This chapter explains how to install and configure ColdFusion Server in Linux.

Contents
• Linux System Requirements..................................................................................... 40
• Before You Begin the Installation............................................................................. 41
• Installing ColdFusion Server in Linux ..................................................................... 44
• Configuring Your Installation................................................................................... 48
• What to Do Next ........................................................................................................ 53
install.book Page 40 Thursday, May 10, 2001 12:59 PM

40 Chapter 3 Installing ColdFusion Server in Linux

Linux System Requirements


The following table compares the system requirements for the ColdFusion Server
Professional and Enterprise Editions:

ColdFusion ColdFusion
Server Server
Requirement Professional Enterprise
Linux Distribution
Red Hat Linux 6.2 and later* x x
SuSE Linux 7.0 and later*† x x
Cobalt RAQ3, RAQ4, XTR*† x x
Hardware
Processor Pentium Pentium
Minimum RAM 128 MB 256 MB
Recommended RAM 256 MB 512 MB
Free Hard Disk Space 200 MB 350 MB
CD-ROM Drive x x
Web Server
iPlanet/Netscape Enterprise Server 4.1† x x
Apache Server 13.6‡ x x
* All Linux distributions must be running glibc-2.1.3-11 or later, gcc/egcs
libstdc++ 2.9, and 2.2 kernel or later. For performance reasons, the Cold-
Fusion team recommends performing a Linux Server or Custom install
of Red Hat 6.x rather than KDE or GNOME installation.
† ClusterCATS and Application Management features are not supported on
this platform.
‡ ColdFusion Server provides a precompiled module that is binary compat-
ible with versions 1.3.6 through 1.3.19. ColdFusion Server also provides
the files required to build a version of the ColdFusion plug-in module for
a custom version of Apache 1.3.x. For more information, see “Configur-
ing Web servers manually” on page 48.
install.book Page 41 Thursday, May 10, 2001 12:59 PM

Before You Begin the Installation 41

Before You Begin the Installation


This section contains the following pre-installation instructions:
• Required operating system patches
• Installing SNMP in Red Hat
• Important Network Considerations
• Upgrading from a previous version
• Verifying that a Web server is running
• Uninstalling ColdFusion Server 5

Required operating system patches


The following table lists the patches and packages that must be installed before to
installing ColdFusion Server 5:

Linux
Distribution Patch Where to find it
Red Hat 6.2, 7.0 compat-libstdc++ RPM ftp://ftp.redhat.com/pub/redhat/current/
UCD-SNMP 4.2.1 Required only for MIB functionality. For
instructions, see “Installing SNMP in
Red Hat” on page 41.
SuSE 7.0 apache.rpm ftp://ftp.suse.com/pub/suse/i386/
update/
Cobalt RAQ 3, glibc-2.1.3-22 http://www.cobalt.com/support/
RAQ4, XTR download/index.html
glibc-profile-2.1.3-22 http://www.cobalt.com/support/
download/index.html
glibc-devel-2.1.3-22 http://www.cobalt.com/support/
download/index.html
Red Hat 6.0 glibc patch ftp://ftp.redhat.com/pub/redhat/current/

Installing SNMP in Red Hat


Managed data is accessible in ColdFusion Server 5 Enterprise Edition through the
Simple Network Management Protocol (SNMP) Management Information Base
(MIB) for Application Management features. You can integrate this information with
third-party system management tools. These tools let you manage diverse
components of your enterprise from a management station in your network.
If you want to use ColdFusion Server MIB features, you must install SNMP before
installing ColdFusion Server. For instructions, see the following procedures.

Tip
To find the version of SNMP that you are currently running, enter snmpd -v.
install.book Page 42 Thursday, May 10, 2001 12:59 PM

42 Chapter 3 Installing ColdFusion Server in Linux

To install SNMP in Red Hat:


The ColdFusion Server MIB Agent uses the Dynamic Module approach of
UCD-SNMP 4.2. To use the MIB Agent, you must ensure that UCD-SNMP 4.2.1 or
higher is installed on your system.
1 Download UCD-SNMP 4.2.1 from http://net-snmp.sourceforge.net(download):
• For Red Hat 6.2, download ucd-snmp-4.2.1-2.rh62.i386.rpm
• For Red Hat 7.0, download ucd-snmp-4.2.1-1.rh7.0.i386.rpm

Note
By default, UCD-SNMP installs into the /usr/sbin directory.

2 Install UCD-SNMP 4.2.1 on your system. If installation of UCD-SNMP 4.2.1 RPM


requires openssl, you can download it at http://rpmfind.net.
When you install the MIB Agent, the ColdFusion Server installation asks whether you
want to replace the current snmpd.conf with a version of snmpd.conf that will make
ColdFusion MIB information accessible.
If you answer Yes, the current copy of snmpd.conf in /etc/snmp is renamed to
snmp.conf_original, and the ColdFusion version of snmpd.conf is inserted into /etc/
snmp. If you answer No, the snmpd.conf_macromedia file is placed into /etc/snmp.
You must then merge the content from snmpd.conf_macromedia into snmpd.conf
to make ColdFusion MIB information accessible.
After finishing the ColdFusion Server installation, you must configure your system to
use MIB features. For more information, see “Configuring SNMP MIB” on page 51.

Important Network Considerations


Keep the following table important considerations in mind when configuring your
network before a ColdFusion Server installation:
• ClusterCATS requires that the group btcats exist. It attempts to create this group
during the ColdFusion installation using groupadd. If you are using NIS or NIS+,
ensure that either nsswitch.conf allows for group resolution from the group file,
or the group btcats gets created in NIS/NIS+ before installing ClusterCATS.
• ClusterCATS requires that you enable multicast on all network adapters. To
enable multicast on an adapter, enter the following command:
ifconfig eth0 multicast
• In this example, the adapter is eth0; enter an appropriate adapter name for your
configuration.
• In an optimal production environment, each ColdFusion Server application
should be hosted on a dedicated server. A database, mail, or other server should
not reside on the same server as ColdFusion Server.
• If you intend to install ClusterCATS, you must first prepare your server. For
instructions, see “Preparing Your Server for ClusterCATS” on page 135.
install.book Page 43 Thursday, May 10, 2001 12:59 PM

Before You Begin the Installation 43

Upgrading from a previous version


The ColdFusion Server 5 installation upgrades your current version of ColdFusion
Server automatically. However, keep in mind the following important instructions
when upgrading from a previous release of ColdFusion Server:
• Using the ClusterCATS Explorer or btcluadm, you must remove cluster member
servers before upgrading them to ColdFusion Server 5. In addition, some
ClusterCATS management operations using the btcluadm utility require a license
key. The license key is "GoColdFusion".
• To continue to use VisiBroker for CORBA connections in ColdFusion Server 5,
copy the libraries bundled with ColdFusion Server 4.5.1 into the appropriate
directory. If you uninstall a previous release of ColdFusion Server before
installing ColdFusion Server 5, these libraries are removed from your system.
Copy the libraries to a safe location before the uninstall.

Warning
Before proceeding with the upgrade, backup your ColdFusion Server Web
applications.

Verifying that a Web server is running


Before installing ColdFusion Server, ensure that your Web server is installed and
running.

To check that your local Web server is running:


Enter the URL for a Web page or site from your local Web server in your browser’s
Address field and press Enter.
For example, if the file myindex.htm is in your Web document root directory, load
the page in your browser using the localhost URL:
http://127.0.0.1/myindex.htm
If your Web server is not running, you will receive an error message.

Uninstalling ColdFusion Server 5


To remove ColdFusion Server, use the remove utility t.

To uninstall ColdFusion Server:


1 Log in as root.
2 Enter the following command at the prompt:
/opt/coldfusion/uninstall/cfremove
ColdFusion Server is deleted from your server.
install.book Page 44 Thursday, May 10, 2001 12:59 PM

44 Chapter 3 Installing ColdFusion Server in Linux

Installing ColdFusion Server in Linux


This following procedure describes a ColdFusion Server Enterprise Edition
installation. Other editions’ procedure might differ.
By default, ColdFusion Server installs into the /opt directory. To install ColdFusion
Server into a different directory, you must create that directory before running the
installation.
1 Log in as root.
2 If you are installing from a CD-ROM, copy the gziped tar file, using the
coldfusion-50-linux.tar.gz command, to a directory on your local disk. Using
gunzip, uncompress the ColdFusion Server tar file with the following command:
coldfusion-50-linux.tar.gz.
3 Untar the resulting tar file by entering the following command:
tar -xvf coldfusion-50-linux.tar
4 Using the cd command, go to the resulting directory:
5 cd coldfusion-50-linux
6 Run the ColdFusion Server installation script by entering the following
command:
./cfinstall
The ColdFusion Server installation script starts.
7 Enter your ColdFusion license key and press Enter.

Note
You can find your ColdFusion Server license key on the product box and the
CD-ROM packaging.

8 After entering the install directory for ColdFusion Server, the installation process
prompts you to enter the name of your Web server.

Note
If you entered Other or if you have a custom release of Apache, such as usr/local/
apache, see “Configuring Web servers manually” on page 48.

At the corresponding prompt, press Enter to let the installation script


automatically configure your Web server. When prompted, enter the location of
your httpd.conf file.
9 When prompted, enter the path of your Web server’s document root directory,
and select whether to install the ColdFusion Server documentation and the
example applications.
install.book Page 45 Thursday, May 10, 2001 12:59 PM

Installing ColdFusion Server in Linux 45

Warning
Because of potential security concerns, the ColdFusion Server team recommends
that you not install the example applications in production environments.

10 After entering and confirming the passwords for the ColdFusion Administrator
and ColdFusion Studio, enter the login name under which ColdFusion Server
runs.
11 For each option that you want to install, you are prompted to enter y to install the
ColdFusion Server options. Enter y for each option to install.
The following table lists important installation option options and
considerations for ColdFusion Enterprise Edition customers:.

Option Description
Reporting and Accessed through the ColdFusion Administrator, this option
Archive/ provides ColdFusion application reporting statistics and the ability
Deploy to archive and deploy ColdFusion applications.
Monitors, Accessed through the ColdFusion Administrator, this option
Alarms, and provides ColdFusion application performance monitoring,
Load-Balancer threshold alarms, and hardware load-balancing integration for
Integration Cisco LocalDirector. If you select ClusterCATS, these features is
provided through the ClusterCATS Web Administrator.
ClusterCATS Provides software-based load-balancing and IP failover support
for ColdFusion Server. If you want the server on which you are
installing ClusterCATS to be able to assume the IP address and
HTTP traffic of a failed server in the cluster, enter y to configure
this server with failover services. For more information, see
“Preparing Your Server for ClusterCATS” on page 135.
SNMP MIB Provides application information to third-party applications. You
must install SNMP on Linux before installing ColdFusion Server.
For instructions, see “Installing SNMP in Red Hat” on page 41
and “Configuring SNMP MIB” on page 51.

12 Press Enter to begin the installation.


When the installation is complete, a shell script restarts the Web server and starts
ColdFusion Server services.
install.book Page 46 Thursday, May 10, 2001 12:59 PM

46 Chapter 3 Installing ColdFusion Server in Linux

ColdFusion Server processes


The ColdFusion Server installation creates the following processes in Linux:

Process Purpose
cfexec Starts and stops the other processes and manages page
scheduling.
cfserver The main ColdFusion Server service. ColdFusion pages cannot
be processed if this service is not running.
cfrdsservice Provides system support for the Administrator and security and
debugging services for ColdFusion Studio,
java Provides a runtime for the ColdFusion Server graphing and
charting features and application management features.
ipaliasd Provides IP failover capability for ClusterCATS.*
reqmgr Processes ClusterCATS operations as root.*
ccmgr Creates processes to support ClusterCATS*
wsprobe Probes the application server for load and restarts
unresponsive Web servers*
CANamingAdapter Controls the data store for application management features*
dfp Provides load-balancing information to LocalDirector*
* Available in ColdFusion Server Enterprise only

Starting and stopping ColdFusion Server processes


In general, you should stop and restart ColdFusion Server after making changes in
the ColdFusion Administrator that affect a data source or connection parameter,
such as caching, thread count, and so on.
ColdFusion Server provides two scripts for starting and stopping ColdFusion Server
processes manually in Linux:
/opt/coldfusion/bin/start
/opt/coldfusion/bin/stop
In addition, ColdFusion Application Manager provides two scripts for starting and
stopping ClusterCATS and the Application Manager:
/opt/coldfusion/bin/cfam-start
/opt/coldfusion/bin/cfam-stop

Note
To run the scripts, you must be logged in with root privileges.
install.book Page 47 Thursday, May 10, 2001 12:59 PM

Installing ColdFusion Server in Linux 47

ColdFusion Server also provides the following scripts to start and stop ColdFusion
Server during system startup and shutdown:

Script Function
/etc/rc.d/init.d/coldfusion Starts and stops ColdFusion Server.
/etc/rc1.d/K19coldfusion Stops ColdFusion Server during system
shutdown.
/etc/rc3.d/S90coldfusion Starts ColdFusion Server during system
/etc/rc4.d/S90coldfusion startup.
/etc/rc5.d/S90coldfusion
/etc/rc.d/init.d/btccmgr start Starts ClusterCATS and application
management processes.
/etc/rc.d/init.d/btccmgr restart Stops ClusterCATS and application
management processes.
install.book Page 48 Thursday, May 10, 2001 12:59 PM

48 Chapter 3 Installing ColdFusion Server in Linux

Configuring Your Installation


After installation, you may need to configure Linux to work with ColdFusion Server.
This section addresses the following topics:
• Configuring Web servers manually
• Configuring SNMP MIB
• Configuring databases

Configuring Web servers manually


If you did not configure your Web server automatically duringColdFusion Server
installation, you must manually configure the Web server. This section explains how
to do this manually in Linux, for the following Web servers:
• Netscape/iPlanet Web Server
• Apache Web server

Netscape/iPlanet Web Server


The ColdFusion Server NSAPI plug-in has been tested with Netscape/iPlanet
Enterprise Web Server 4.1 and the Netscape FastTrack Web Server 4.1. The
installation script prompts you to configure either of these servers automatically.

The Netscape/iPlanet plug-in


Netscape/iPlanet plug-ins for ColdFusion Server are installed in the <installdir>/
coldfusion/webserver/nsapi directory.
The following procedure assumes that you installed the Netscape/iPlanet server in
/usr/netscape/server4 on the system named smurf.

To configure the Netscape/iPlanet plug-in:


1 Copy the plug-in to a directory named coldfusion in your server directories.
mkdir /usr/netscape/server4/plugins/coldfusion
cp /opt/coldfusion/webserver/nsapi/coldfusion35.so \
/usr/netscape/server4/plugins/coldfusion/coldfusion.so
2 Edit the /usr/netscape/server4/https-smurf/config/mime.types file to add a
new ColdFusion Server type. Add the line:
type=magnus-internal/cold-fusion exts=exts=cfm,dbm,cfml,dbml
3 Edit the /usr/netscape/server4/https-surf/config/obj.conf file to add new
service and init directives. Add all of the following on one line:
Init fn="load-modules" shlib="/usr/netscape/server4/
plugins/coldfusion/coldfusion.so" funcs="DoCFRequest"
4 Add the following line in the default Object:
Service fn="DoCFRequest" method="(GET|POST)"
type="magnus-internal/cold-fusion"
5 Stop and restart the Web server.
install.book Page 49 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 49

Note
If you run the Netscape/iPlanet Server Manager, the browser-based Web server
administrator, you may receive a warning about edits to Netscape configuration
files. This is normal. To reload the new configuration files, follow the instructions
and click Apply.

If your server does not restart, check that the pathname for the plug-in you
specified in the obj.conf file is correct for your installation and that it is on a
single line.

Apache Web server


ColdFusion Server has been tested with Apache version 1.3.6. To download Apache,
go to the Apache Web site at http://www.apache.org.
ColdFusion Server includes a precompiled binary module for Apache,
mod_coldfusion_so, that has been tested with Apache 1.3.6 - 1.3.19. This module
works with most versions of Apache, but if you must compile your own version of
Apache, see the Apache Readme file at /opt/coldfusion/webserver/apache/readme.
Follow the appropriate procedure, according to your Linux distribution, to configure
Red Hat and Apache and SuSE/Cobalt with Apache:
• To configure Red Hat and Apache:
• To configure SuSE/Cobalt and Apache:

To configure Red Hat and Apache:


1 Shut down Apache with the following command:
/etc/rc.d/init.d/httpd stop
2 To check whether your version of Apache is built with EAPI, run this command:
httpd -V
If the output contains the line -D EAPI, you have an EAPI version of Apache.
3 Open the file /etc/httpd/conf/httpd.conf in a text editor.
a If you are not running an EAPI version of Apache, in the section LoadModule,
add this line:
LoadModule coldfusion_module /opt/coldfusion/webserver/apache/
mod_coldfusion_standard.so
If you are running an EAPI, add this line:
LoadModule coldfusion_module /opt/coldfusion/webserver/apache/
mod_coldfusion_EAPI.so
b In the section AddModule, add this line:
AddModule mod_coldfusion.c
c Save the file.
4 Restart Apache with this command:
/etc/rc.d/init.d/./httpd start
install.book Page 50 Thursday, May 10, 2001 12:59 PM

50 Chapter 3 Installing ColdFusion Server in Linux

To configure SuSE/Cobalt and Apache:


1 To check whether your version of Apache is built with EAPI, run this command:
httpd -V
If the output contains the line -D EAPI, you are running an EAPI server. (SuSE
requires an EAPI version of mod.coldfusion.so.)
2 Shut down Apache with the following command:
/etc/rc.d/apache stop
3 Open the file /etc/httpd/httpd.conf in a text editor.
a In the section LoadModule, add the following lines:
LoadModule mmap_static_module /usr/lib/apache/mod_mmap_static.so
LoadModule setenvif_module /usr/lib/apache/mod_setenvif.so
LoadModule coldfusion_module /opt/coldfusion/webserver/apache/
mod_coldfusion_EAPI.so
b In the section AddModule, add the following lines:
ClearModuleList
AddModule mod_mmap_static.c
AddModule mod_vhost_alias.c
AddModule mod_so.c
AddModule mod_setenvif.c
AddModule mod_coldfusion.c
c Save the file.
4 Create a symbolic link from the EAPI version of the ColdFusion Server module to
the /usr/lib/apache directory, to ensure that the EAPI module is executable:
chmod 755 /opt/coldfusion/webserver/apache/mod_coldfusion_EAPI.so
ln -s /opt/coldfusion/webserver/apache/mod_coldfusion_EAPI.so /
usr/lib/apache/mod_coldfusion.so
5 Open the file /etc/rc.d/apache in a text editor.
a Look for the following lines:
if ! test "$HTTPD_SEC_MOD_SAPCGI" == "no" ; then
test -e /usr/lib/apache/mod_fastcgi_sap.so || \
test $(/usr/sbin/httpd -l | grep "mod_fastcgi_sap.c") =
"mod_fastcgi_sap.c" 2> /dev/null \
&& MODULES="-D SAP_CGI $MODULES" && echo -n " SAP-fastcgi"
fi
b Add these lines directly below the previous lines:
if ! test "$HTTPD_SEC_MOD_COLDFUSION" == "no" ; then
test -e /usr/lib/apache/mod_coldfusion.so && MODULES="-D
COLDFUSION $MODULES" && echo -n " Coldfusion"
fi
6 Restart Apache with this command:
/etc/rc.d/apache start
install.book Page 51 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 51

Configuring SNMP MIB


To use the ColdFusion Server MIB features, you must configure the following
settings.

To configure Red Hat to use the MIB Agent:


1 Stop the SNMP Server by entering the following command as root:
/etc/rc.d/init.d/snmpd stop
2 For each server that is to receive trap messages from the local host, add the
following line to /etc/snmp/snmpd.conf:
trapsink server1.macromedia.com public
where server1.macromedia.com is the name of the destination server, and
public is the name of the community under which the trap messages are sent.
Ensure that the destination server, such as server1.macromedia.com, is
configured to receive traps from the specified community, such as public.

Warning
Ensure that the following line does not appear in snmpd.conf more than once:
dlmod allaire /usr/lib/btcats/program/allaire_mib.so

3 Go to the Debug Options page of the ColdFusion Administrator, and ensure


Enable Performance Monitoring is selected.
4 Start the SNMP Server, enter the following command as root:
/etc/rc.d/init.d/snmpd start

Tip
You can find a copy of the MIB definition in /usr/lib/btcats/database/
lhmib_UNIX.mib.

Configuring the MIB Agent for HTTPS and non-default ports


To use HTTPS, a different Web server name, or a different port to access the Web
document root for ColdFusion MIB information, modify the content of /usr/lib/
btcats/database/mib.properties file.
This file usually contains a single entry, such as http://maine where maine is the
name of the local host and http://maine is the Web document root directory for the
ColdFusion MIB information. To use HTTPS, a different Web document root
(maine1), and port (459), edit the entry to https://maine1:459.

Configuring databases
After the install is complete, but before you can set up data sources in the
ColdFusion Administrator, you must edit the /opt/coldfusion/bin/start script to
include information about whatever database(s) you use.
install.book Page 52 Thursday, May 10, 2001 12:59 PM

52 Chapter 3 Installing ColdFusion Server in Linux

Normally this requires two changes per database: setting a database-specific


environment variable, and adding the path to the client-side database libraries to
your LD_LIBRARY_PATH environment variable. The start script provides examples
to help you.
After editing the start script, you must stop and restart ColdFusion Server for the
changes to take effect. Then, you can proceed to the ColdFusion Administrator to set
up your data sources.

Note
For more information, see “Managing Data Sources” on page 109.

In Linux, you must use certain database clients in Linux. The following table lists the
required clients for ColdFusion Server 5 in Linux:
• The Oracle ODBC database driver requires the Oracle Client version 8.1.6.1 or
higher.
• Red Hat requires the following Sybase Open Client 11.9.2-3 components or later
to use the Sybase native database driver:
− sybase-common-11.9.2-3.i386.rpm
− sybase-openclient-11.1.1-3.i386.rpm
install.book Page 53 Thursday, May 10, 2001 12:59 PM

What to Do Next 53

What to Do Next
After installing ColdFusion Server and configuring your installation, you must
perform some initial administration tasks using the ColdFusion Administrator,
ColdFusion Server’s Web-based control console. For more information, see “Initial
Administration Tasks” on page 68.
install.book Page 54 Thursday, May 10, 2001 12:59 PM

54 Chapter 3 Installing ColdFusion Server in Linux


install.book Page 55 Thursday, May 10, 2001 12:59 PM

Chapter 4

Installing ColdFusion Server


in HP-UX

This chapter explains how to install and configure ColdFusion Server in HP-UX.

Contents
• HP-UX System Requirements................................................................................... 56
• Before You Begin the Installation............................................................................. 57
• Installing ColdFusion Server in HP-UX ................................................................... 60
• Configuring Your Installation................................................................................... 62
• What to Do Next ........................................................................................................ 66
install.book Page 56 Thursday, May 10, 2001 12:59 PM

56 Chapter 4 Installing ColdFusion Server in HP-UX

HP-UX System Requirements


The following table contains the system requirements for the ColdFusion Server
Enterprise Edition:

ColdFusion
Requirement Server Enterprise
HP-UX Version
HP-UX 11.0 x
Hardware
Processor PA-RISC 1.1 or 2.0
Minimum RAM 128 MB
Recommended RAM 128 MB
Free Hard Disk Space 120 MB
CD-ROM Drive x
Web Server
iPlanet/Netscape Enterprise Server 3.51, 4.1 x
Apache Server 1.3.x* x
* ColdFusion Server provides a precompiled module that is binary compat-
ible with versions 1.3.6 through 1.3.19. ColdFusion Server also provides
the files required to build a version of the ColdFusion plug-in module for
a custom version of Apache 1.3.x. For more information, see “Configur-
ing Web servers manually” on page 62.
install.book Page 57 Thursday, May 10, 2001 12:59 PM

Before You Begin the Installation 57

Before You Begin the Installation


This section contains the following pre-installation instructions:
• Required operating system settings
• Upgrading from a previous version
• Verifying that a Web server is running
• Mounting the installation CD-ROM
• Uninstalling ColdFusion Server 5

Required operating system settings


The following list includes patches that must be installed, kernel settings that must
be configured, and general issues to consider before installing ColdFusion Server 5:
• Ensure that you have the latest HP-UX 11.0 patch bundle installed. To download
the latest patch bundle, go to http://www.hp.com.
• Configure your minimum kernel parameter settings as follows:

maxdsize 0x79000000
maxssize 0x8000000
maxtsize 0x8000000
maxfiles 1024
maxusers 64 (to indirectly boost NKTHREAD, used below)
max_thread_proc (NKTHREAD-10)

• Note the Web server, Web root, and configuration file locations. They will be
needed during the installation.
• Note the HP-UX username under which ColdFusion Server will run. It will be
needed during the installation.
• Note where you want to install ColdFusion Server on your system (/opt is the
default directory).

Upgrading from a previous version


The ColdFusion Server installation automatically upgrades previous versions of
ColdFusion Server for HP-UX 11.0.
However, to continue to use VisiBroker for CORBA connections in ColdFusion Server
5, copy the libraries bundled with ColdFusion Server 4.5.1 into the appropriate
directory. If you uninstall a previous release of ColdFusion Server before installing
ColdFusion Server 5, these libraries are removed from your system. Before the
uninstall, copy the libraries to a safe location.
install.book Page 58 Thursday, May 10, 2001 12:59 PM

58 Chapter 4 Installing ColdFusion Server in HP-UX

Warning
Before upgrading, backup your ColdFusion Server Web applications.

Verifying that a Web server is running


Before installing ColdFusion Server, ensure that the Web server is installed and
running.

To check that your local Web server is running:


Enter the URL for a Web page or site from your local Web server in your browser’s
Address field and press Enter.
For example, if the file myindex.htm is in your Web document root directory, load
the page in your browser using the localhost URL:
http://127.0.0.1/myindex.htm
If your Web server is not running, you will receive an error message.

Mounting the installation CD-ROM


To accommodate long filenames, ColdFusion Server 5 is written to the CD-ROM
using the RockRidge format. This format is supported by HP-UX using the Portable
File System (PFS) commands, not the standard HP-UX mount/umount commands.
For more information on the PFS commands, enter man pfs_mount.

To mount the CD-ROM using the HP PFS commands:


1 Create a mount point for the CD. For example:
mkdir /SD_CDROM.
2 Create an entry in the PFS mount file.
a Create or edit the file /etc/pfs_fstab, adding an entry like the following:
/dev/dsk/c1t2d0 /SD_CDROM pfs-rrip xlat=unix 0
The fields in this file have the following meanings:
<device_file> <mount_point> <fs_type> <translation_method>
b In your entry, ensure the path that you set in the device_file field is the device
name of your CD-ROM drive, and that your mount_point is the name that
you selected for the mount point in step 1.
3 Start the PFS processes:
nohup /usr/sbin/pfs_mountd &
nohup /usr/sbin/pfsd &
4 Mount the CD:
/usr/sbin/pfs_mount /SD_CDROM
install.book Page 59 Thursday, May 10, 2001 12:59 PM

Before You Begin the Installation 59

The CD-ROM should be visible under /SD_CDROM. When you finish using the
CD-ROM, you can unmount it using the following command:
/usr/sbin/pfs_umount /SD_CDROM

Uninstalling ColdFusion Server 5


Use the cfremove utility to remove an installed version of ColdFusion Server.

To uninstall ColdFusion Server:


1 Log in as root.
2 Run the following command:
/opt/coldfusion/uninstall/cfremove
ColdFusion Server is deleted from your server.
install.book Page 60 Thursday, May 10, 2001 12:59 PM

60 Chapter 4 Installing ColdFusion Server in HP-UX

Installing ColdFusion Server in HP-UX


The installation procedure assumes that you are installing from a CD-ROM. If you
purchased and downloaded ColdFusion Server, place the tar.gz file into its own
directory, and follow the install procedure below, substituting the location to which
you downloaded ColdFusion Server for references to the CD-ROM.
The procedure below describes a ColdFusion Server Enterprise Edition installation.
Other editions’ procedures might differ.
By default, ColdFusion Server installs into the /opt directory. To install into a
different directory, you must create that directory before running the installation.
1 Log in as root.
2 Mount the CD-ROM using the HP PFS extensions. For instructions, see
“Mounting the installation CD-ROM,” on page 58.
3 Copy the tar.gz file to a temporary location on your hard disk. Run gunzip on the
file, untar the resulting tar file, and change directory to the directory created by
tar.
4 To start the installation process, enter cfinstall.
5 When prompted, enter the ColdFusion Server registration ID (license key).

Note
You can find your ColdFusion Server license key on the product box and the
CD-ROM packaging.

6 After entering the install directory for ColdFusion Server, the installation process
prompts you to enter the name of your Web server.
At the corresponding prompt, enter y to let the installation script automatically
configure your Web server. If you use Apache, you must configure it manually.
For more information, see “Configuring Web servers manually” on page 62. Enter
the install home directory, the instance root directory, and document root
directory for your Web server at the corresponding prompts.
7 Select whether to install the ColdFusion Server documentation and example
applications.

Warning
Because of potential security concerns, the ColdFusion Server team recommends
that you not install the example applications in production environments.

8 After selecting whether to let ColdFusion Server start automatically at system


startup, enter and verify passwords for the ColdFusion Administrator and the
Rapid Development System (RDS) for ColdFusion Studio.
9 Enter the username under which ColdFusion Server will run.
10 Press Enter to begin the installation.
install.book Page 61 Thursday, May 10, 2001 12:59 PM

Installing ColdFusion Server in HP-UX 61

When the installation is complete, the install program starts the ColdFusion Server
services.
If you are running a version of the Netscape/iPlanet Web server, the install program
also configures the Web server to run ColdFusion Server and restart the Web server
automatically.
If you are running the Apache Web server, you must configure and restart the Web
server manually before it will work with ColdFusion Server. Follow the instructions
displayed by the ColdFusion Server installation script for configuring the Apache
Web server, or see “Configuring Web servers manually” on page 62.

ColdFusion Server processes


The ColdFusion Server installation creates the following processes in HP-UX:

Process Purpose
cfexec Starts/stops the other processes and manages page scheduling
cfserver The main ColdFusion Server service. ColdFusion pages cannot be
processed if this service is not running.
cfrdsservice Provides system support for the Administrator and security and
debugging services for ColdFusion Studio

Starting and stopping ColdFusion Server processes


ColdFusion Server provides two scripts for starting and stopping ColdFusion Server
processes manually in HP-UX:
/opt/coldfusion/bin/start
/opt/coldfusion/bin/stop
install.book Page 62 Thursday, May 10, 2001 12:59 PM

62 Chapter 4 Installing ColdFusion Server in HP-UX

Configuring Your Installation


After installation, may have to configure HP-UX to work with ColdFusion Server.
This section addresses the following topics:
• Configuring Web servers manually
• Configuring databases

Configuring Web servers manually


If you did not configure your Web server automatically during ColdFusion Server
installation, you must configure it manually. This section explains how to do this in
HP-UX, for these Web servers:
• Netscape/iPlanet Web Server
• Apache Web Server

Netscape/iPlanet Web Server


The ColdFusion Server NSAPI plug-in was tested with Netscape/iPlanet Enterprise
Web Server 3.5.1 and 4.1 and Netscape FastTrack Web Server 3.5.1 and 4.1. The
installation script prompts you to configure either of these servers automatically.

The Netscape/iPlanet plug-in


Netscape/iPlanet plug-ins for ColdFusion Server are installed in the opt/coldfusion/
webserver/nsapi directory.
The following procedure assumes that you installed the Netscape/iPlanet server in
/usr/netscape/server4 on the system named smurf.

To configure the Netscape/iPlanet plug-in:


1 Copy the plug-in to a directory named coldfusion in your server directories.
mkdir /usr/netscape/server4/plugins/coldfusion
cp /opt/coldfusion/webserver/nsapi/coldfusion35.so \
/usr/netscape/server4/plugins/coldfusion/coldfusion.so

2 Edit the /usr/netscape/server4/https-smurf/config/mime.types file to add a


new ColdFusion Server type. Add the line:
type=magnus-internal/cold-fusion exts=cfm,dbm,cfml,dbml
3 Edit the /usr/netscape/server4/https-surf/config/obj.conf file to add new
service and init directives. Add all of the following on one line:
Init fn="load-modules" shlib="/usr/netscape/server4/
plugins/coldfusion/coldfusion.so" funcs="DoCFRequest"
4 Add the following line in the default Object:
Service fn="DoCFRequest" method="(GET|POST)"
type="magnus-internal/cold-fusion"
5 Stop and restart the Web server.
install.book Page 63 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 63

Note
If you run Netscape/iPlanet Server Manager, the browser-based administrator,
you get a warning about edits to the Netscape configuration files. This is normal.
To reload the new configuration files, follow the instructions and click Apply.

6 Verify that ColdFusion Server works by following the procedure in “Configuring


Your Installation” on page 62.
If your server does not restart, ensure that the path name for the plug-in you
specified in the obj.conf file is correct for your installation and that it is on a
single line.

Apache Web Server


ColdFusion Server attaches to Apache using a dynamically-loaded shared library
(DSO). To use ColdFusion Server with Apache, you must have a version of the
ColdFusion DSO that matches the version of Apache you're running.

To install and configure Apache:


1 Shut down Apache.
2 To check whether your version of Apache is built with EAPI, run the following
command:
httpd -V
If the output contains the line -D EAPI, you are running an EAPI version of
Apache.
3 ColdFusion Server includes a version of the ColdFusion DSO that was built with
Apache 1.3.6 and that works with Apache 1.3.14. This version is located in /opt/
coldfusion/webserver/apache/mod_coldfusion.sl. If you use a version of Apache
built with the Extended API (EAPI), you must use the mod_coldfusion-EAPI.sl
module.
Copy the appropriate module into the libexec subdirectory of your Apache
installation.

Note
For more information, see the Readme file located in /opt/coldfusion/
webserver/apache.

4 For Apache to use the ColdFusion DSO, you must enable Apache DSO support.
To check whether DSO support is enabled, enter the following command from
within the Apache bin directory:
httpd -l
If the output does not include a line containing something like mod_so.c, you
must enable DSO support by running the configure script with the
enable-module option included; for example:
configure --enable-module=rewrite --enable-shared=rewrite
install.book Page 64 Thursday, May 10, 2001 12:59 PM

64 Chapter 4 Installing ColdFusion Server in HP-UX

5 Open src/Makefile in a text editor.


a Find the following line:
LIBS1= -lcl -lm -lpthread
If it does not contain -lcl , add it.
b Save the file.
6 After performing Steps 4 and 5, you must rebuild Apache and then re-install the
new configuration. For instructions, see the Apache documentation.
7 Open the file /etc/httpd/httpd.conf in a text editor.
a If you are not running an EAPI version of Apache, in the section LoadModule,
add the following line:
LoadModule coldfusion_module libexec/mod_coldfusion.sl

If you are running an EAPI, add the following line:


LoadModule coldfusion_module libexec/mod_coldfusion-EAPI.sl

b In the section AddModule, add the following line:


AddModule mod_coldfusion.c

c Save the file.


8 Restart Apache.

Configuring databases
After the install is completed, but before you can set up a data source in the
ColdFusion Administrator, you must edit the /opt/coldfusion/bin/start script to
include information about the database(s) you use.
Normally this requires two changes per database: setting a database-specific
environment variable, and adding the path to the client-side database libraries to
your SHLIB_PATH environment variable. The start script provides examples to help
you.
After editing the start script, you must stop and restart ColdFusion Server for the
changes to take effect. After that finishes, proceed to the ColdFusion Administrator
to set up your data sources.

Note
For more information, see “Managing Data Sources” on page 109.
install.book Page 65 Thursday, May 10, 2001 12:59 PM

Configuring Your Installation 65

The following table includes important database compatibility information for


ColdFusion Server 5 in HP-UX:

Database ODBC Native


Oracle 8 Yes (Tested using Oracle 8.04 Yes (Tested using Oracle 8.04
and 8.16 clients) and 8.16 clients)
Oracle 7 No (Oracle client software No (Oracle client software
unavailable on HP-UX 11.0) unavailable on HP-UX 11.0.)
Sybase 11 Yes (Tested using Sybase 11.1.1 Yes (Tested using Sybase
client. Clientless driver available.) 11.1.1 client.)
Informix 7and 9 Yes (Tested Informix 9 and with Yes (Tested Informix 9 and with
2.40 client. Clientless driver 2.40 client. Cannot be used
available for Informix9.) simultaneously with ODBC
connections.)
IBM DB2 No (ODBC driver unavailable in Yes (Tested using 6.1 client.
HP-UX 11.0) Cannot be used simultaneously
with ODBC connections.)
Microsoft SQL Yes (Tested connecting to MS No (No native client libraries
Server SQL Server 6.5 and 7.0 DBs. available on HP-UX 11.0)
Wire protocol, no client required.)
dBase/FoxPro Yes (Simple "flat file" DB. No No (ODBC-access only)
client library required.)
OpenIngress No (ODBC driver unavailable in Not Applicable
HP-UX 11.0)
Text Yes (Comma-separated field text) Not Applicable
install.book Page 66 Thursday, May 10, 2001 12:59 PM

66 Chapter 4 Installing ColdFusion Server in HP-UX

What to Do Next
After installing ColdFusion Server and configuring your installation, you must
perform some initial administration tasks using the ColdFusion Administrator,
ColdFusion Server’s Web-based control console. For more information, see “Initial
Administration Tasks” on page 68.
install.book Page 67 Thursday, May 10, 2001 12:59 PM

Chapter 5

Basic ColdFusion Server


Administration

Structured according to ColdFusion Administrator categories, this chapter explains


basic ColdFusion Server administration tasks.

Contents
• Initial Administration Tasks ..................................................................................... 68
• The ColdFusion Administrator ................................................................................ 69
• Server Settings ........................................................................................................... 70
• Caching ...................................................................................................................... 71
• Client Variables.......................................................................................................... 72
• Memory Variables ..................................................................................................... 76
• Locking....................................................................................................................... 77
• Mappings ................................................................................................................... 79
• Mail/Mail Logging..................................................................................................... 80
• Data Sources .............................................................................................................. 82
• Verity Collections ...................................................................................................... 83
• Debug Settings........................................................................................................... 88
• Automated Tasks ....................................................................................................... 90
• Extensions.................................................................................................................. 93
• Security ...................................................................................................................... 99
• Basic Security........................................................................................................... 100
• Tools ......................................................................................................................... 102
• Logs and Statistics ................................................................................................... 103
install.book Page 68 Thursday, May 10, 2001 12:59 PM

68 Chapter 5 Basic ColdFusion Server Administration

Initial Administration Tasks


Immediately after installing ColdFusion Server, you may have to perform some or all
of the administrative tasks described in the following table:

Task Description
Establish ColdFusion applications require data source connections to query
database and write to databases. To create, verify, modify, and delete
connections database connections, use the Data Sources pages in the
Administrator.
For more information, see “Managing Data Sources” on page 109.
Specify directory Directory mappings redirect relative file paths to physical
mappings directories on your server. To specify server-wide directory aliases,
use the Mappings page in the Administrator.
For more information, see “Mappings” on page 79.
Configure debug Debug information provides important data about CFML page
options processing. To choose what debug information to display and to
designate an IP address(es) to receive debug information, use the
Debug Settings pages of the Administrator.
For more information, see “Debug Settings” on page 88.
Set up e-mail E-mail lets ColdFusion Server and ColdFusion applications send
automated mail messages. To configure an email server and mail
options, use the Mail/Mail Logging page of the Administrator.
For more information, see “Mail/Mail Logging” on page 80.
Change You may have to change the passwords that you set for the
passwords ColdFusion Administrator and ColdFusion Studio during the
ColdFusion Server installation. To change passwords, use the
Basic Security pages of the Administrator.
For more information, see “CF Admin Password” on page 100 and
“CF Studio Password” on page 101.
Configure Java Java and Java applets require configuring Java settings, such as
settings JVM paths. To change Java settings, use the JVM and Java
Settings page of the Administrator.
For more information, see “Extensions” on page 93.
Restrict tag Some CFML tags may present a potential security risk for your
access server. To disable certain tags and tag attributes system-wide, use
the Tag Restrictions page of the Administrator.
For more information, see “Tag Restrictions” on page 100.
install.book Page 69 Thursday, May 10, 2001 12:59 PM

The ColdFusion Administrator 69

The ColdFusion Administrator


You use the Administrator to perform administrative tasks for the ColdFusion Server,
such as adding and configuring a data source, or scheduling application page
execution, and configuring security settings. During the ColdFusion Server
installation process, you specify an Administrator password that is used to prevent
unauthorized access to the Administrator pages.

To open the ColdFusion Administrator:


• In Windows, select Start > Program Files > ColdFusion Server 5 > ColdFusion
Administrator
or
• In any operating system, open the administrator by entering http://hostname/
CFIDE/administrator/index.cfm in a Web browser where hostname is the name
of the server hosting ColdFusion Server.

Note
The URL path is case-sensitive on Solaris, Linux, and HP-UX.

Accessing the Administrator remotely


To access ColdFusion Administrator pages remotely, enter http://hostname/CFIDE/
administrator/index.cfm in a Web browser, where hostname is the system on which
ColdFusion Server is installed.
If you use ColdFusion Administrator security, you are prompted to enter a password.
If your Web server provides security, access to the Administrator pages is governed
by the Web server’s permissions.
install.book Page 70 Thursday, May 10, 2001 12:59 PM

70 Chapter 5 Basic ColdFusion Server Administration

Server Settings
The Server Settings page of the Administrator contains configuration options you
can set or enable to manage ColdFusion Server. They can significantly affect server
performance. Use the following table to learn more about the option:

Option Description
Limit simultaneous Enter a number to limit simultaneous requests to the ColdFusion
requests* Server. When the server reaches the limit, requests are queued
and handled in the order received. Limiting the number of
simultaneous requests can improve performance.
Timeout requests Enable this option to prevent unusually lengthy requests from
after [n] seconds using up server resources. Enter a limit to the time that
ColdFusion Server waits before terminating a request. Requests
that take longer than the timeout period are terminated.
Restart at [n] Enable this option if you want the ColdFusion Server to track
unresponsive requests that execute code but fail to return in a timely fashion.
requests Enter the number of unresponsive requests at which the service
is restarted. The service restarts within the time specified in
Timeout Request above.
Restart when Enable this option if you want ColdFusion Server to track
requests terminate requests that incur "unexpected exception" abnormal
abnormally termination conditions. The service restarts if abnormal requests
begin to occur on a regular basis.
Suppress Enable this option to compress runs of spaces, tabs and
whitespace by carriage return/line feeds. Compressing whitespace can
default* significantly compact the output of a CFML template.
Enforce strict Enable this option if you want ColdFusion Server to enforce
attribute validation strict attribute validation rules. Extraneous attributes are not
allowed for CFML tags. If this option is not enabled, irrelevant
attributes may be passed to CFML tags. Strict attribute
validation improves template execution time and prevents many
CFML coding errors.
Missing Template Specify a template to execute when ColdFusion Server cannot
Handler find a requested template.
Site-wide Error Specify a template to execute when ColdFusion Server
Handler encounters an error while processing a request.
* Restart ColdFusion Server after making a change to this option.
install.book Page 71 Thursday, May 10, 2001 12:59 PM

Caching 71

Caching
The Caching Settings page of the Administrator contains configuration options that
you can set or enable to cache templates, queries, and data sources. They can
significantly affect server performance. Use the following table to learn more about
the options:

Option Description
Template cache Enable this option to limit the memory reserved for template
size: [n] kilobytes caching. For best performance, set the value to the total
number of kilobytes of all your active ColdFusion pages.
Trusted cache Enable this option if you want ColdFusion Server to use cached
templates without checking whether they changed. For
templates that are not updated frequently, using this option
minimizes file system overhead.
Limit cached Enable this option by entering a value to limit the time that
database ColdFusion Server allows a cached database connection to
connection inactive remain inactive before disconnecting. Enter 0 if inactive
time to [n] minutes connections should be maintained as long as ColdFusion
Server is executing. If the option to maintain database
connections is not enabled in the Edit Data Source page for an
individual data source, the option is ignored. For more
information, see “Adding Data Sources for ColdFusion” on
page 115.
Limit the maximum Enable this option by entering a value to limit the maximum
number of cached number of cached queries that the server maintains. Cached
queries on the queries allow retrieval of result sets from memory rather than
server to [n] queries through a database transaction. Because queries reside in
memory, and query result set sizes differ, you must provide a
limit for the number of cached queries.
install.book Page 72 Thursday, May 10, 2001 12:59 PM

72 Chapter 5 Basic ColdFusion Server Administration

Client Variables
Client variables let you perform tasks like determining the IP address of a site
visitor’s Web browser. Using information from client variables, you can customize
page content for individual users.
You enable client variable default settings in ColdFusion Server on the Client
Variables page of the Administrator. ColdFusion Server lets you store client variables
in these ways:
• The operating system registry
• As cookies in users’ Web browsers
• In a data source.

Note
You can override settings specified in the Client Variables page using the attributes of
the cfapplication tag. For more information, see the Developing ColdFusion
Applications book.

The following table compares these storage options:

Storage Type Advantage Disadvantage


System registry • Simple implementation • Possible restriction of the
• Good performance registry’s maximum size limit on
• Registry can be exported Windows NT and WIndows 2000
easily to other systems in the Control Panel
• Server-side control • Integrated with the host system:
not practical for clustered servers
• Solaris, Linux, and HP-UX
registries are text files. Their
registries deliver slow
performance and low scalability.
Browser cookies • Simple implementation • Users can configure browsers to
• Good performance disallow cookies
• Can be set to expire • ColdFusion Server limits a
automatically cookie’s data to 4 KB
• Client-side control • Netscape Navigator allows only
20 cookies from one host;
ColdFusion Server uses three
cookies to store read-only data,
leaving only 17 cookies available
Data source • Can use existing data • Requires database transaction to
source read/write variables
• Portable: not tied to the • More complex to implement
host system or operating
system
install.book Page 73 Thursday, May 10, 2001 12:59 PM

Client Variables 73

Note
If you use the registry to store client variables, ensure that enough memory is
allocated for it.

To enable client variable storage in the registry as the default:


1 In the Client Variables page, select Registry. Click Apply.
2 To display a page in which to enable the automatic deletion of variables that have
not been used for a specified number of days, click Registry. Click Submit
Changes.

To enable client variable storage in cookies as the default:


In the Client Variables page, select Cookie. Click Submit Changes.

To enable client variable storage in a data source as the default:


1 In the Client Variable page, select a data source in the drop-down list.
2 Click Add Client Variable Storage. The Add/Edit Client Store page for your data
source displays.
3 On the Add/Edit Client Store page, select options for the data source, as
described in the following table. If you do not want to make changes, return to
the Client Variables screen using one of the arrows on the page.

Option Description
Purge data for Enable this option to periodically purge client data that has not
clients that been accessed in a specified number of days, and enter a
remain number.
unvisited for
[n] days
Disable global Enable this option to prevent ColdFusion Server from updating
client variable client variables for every page request. When updates are
updates disabled, ColdFusion Server only updates global client variables
when they are created and when they are changed. Disabling
updates helps improve the performance of application pages.
Create Client Enable this option only when you configure a data source for
database client variable storage the first time. ColdFusion Server creates
tables the tables necessary for client variables. If the data source has
already been configured, disable this option. Otherwise,
ColdFusion Server generates an SQL error because it tries to
create tables that already exist.

4 Click Submit Changes.


install.book Page 74 Thursday, May 10, 2001 12:59 PM

74 Chapter 5 Basic ColdFusion Server Administration

Note
If a cluster of ColdFusion Servers uses this data source, ensure that only one
server is configured to purge client data.

Migrating Client Variable Data


To migrate your client variable data to another data source, you should know the
structure of the database tables used to store this information. Client variables
stored externally use two small database tables, like those shown in the following
tables:

CGLOBAL Table
Column Data Type
cfid char(64)
data memo
lvisit date

CDATA Table
Column Data Type
cfid char(64)
app char(64)
data memo

Creating client variable tables


Use this example ColdFusion page as a model for creating client variable database
tables in your own database. However, keep in mind that not all databases support
the same column data type names. Refer to your database documentation for the
proper data type.

Sample table creation page


<!---- Create the Client variable storage tables in a datasource.
This example applies to Microsoft Access databases --->

<CFQUERY NAME="data1" DATASOURCE="#DSN#">


CREATE TABLE CDATA
(
cfid char(20),
app char(64),
data memo
)
</CFQUERY>
install.book Page 75 Thursday, May 10, 2001 12:59 PM

Client Variables 75

<CFQUERY NAME="data2" DATASOURCE="#DSN#">


CREATE UNIQUE INDEX id1
ON CDATA (cfid,app)
</CFQUERY>

<CFQUERY NAME="global1" DATASOURCE="#DSN#">


CREATE TABLE CGLOBAL
(
cfid char(20),
data memo,
lvisit date
)
</CFQUERY>

<CFQUERY NAME="global2" DATASOURCE="#DSN#">


CREATE INDEX id2
ON CGLOBAL (cfid)
</CFQUERY>

<CFQUERY NAME="global2" DATASOURCE="#DSN#">


CREATE INDEX id3
ON CGLOBAL (lvisit)
</CFQUERY>
install.book Page 76 Thursday, May 10, 2001 12:59 PM

76 Chapter 5 Basic ColdFusion Server Administration

Memory Variables
You use the Memory Variables page of the ColdFusion Administrator to enable
application and session variables server-wide. By default, application and session
variables are enabled when you install ColdFusion Server. If you disable either type
of variable in the Memory Variables page, you cannot use them in a ColdFusion
application.
You can specify maximum and default timeout values for session and application
variables. Unless you define a timeout value in Application.cfm, application
variables expire when you restart ColdFusion Server. Session variables expire when
user sessions end. To change these behaviors, enter default and maximum timeout
values.

Note
Timeout values that you specify for application variables override the timeout values
set in Application.cfm.
install.book Page 77 Thursday, May 10, 2001 12:59 PM

Locking 77

Locking
You use the Locking page of the ColdFusion Administrator to configure automatic
mechanisms to protect shared data from incorrect access and corruption. In
addition, the cflock tag provides granular control of simultaneous access to shared
data scope variables, including server, application, and session scopes. For more
information on the cflock tag, see Developing ColdFusion Applications

Single threaded sessions


Single threading means that requests from a session occur sequentially. Each
request from the same session waits for previous requests to finish before
proceeding, thereby preventing multiple requests from simultaneously accessing
shared data. This option is disabled at installation.
Because session requests occur sequentially, single threaded sessions are useful if
you do not want to lock session scope variables with the cflock tag. At the same
time, if you use frames in your ColdFusion application, each pane loads
consecutively. When single threaded sessions is enabled in the Administrator, you
do not need to the use the cflock tag for session scope variables.
In addition, single threaded sessions can prove valuable to debugging a ColdFusion
application. If the application error goes away when single threaded sessions is
enabled. you likely have an unlocked session scope variable.

Variable scope locking settings


Specify variable scope lock settings by clicking an option. Scope (server, application
and session) settings are described in the following table:

Option Description
No automatic No automatic checking or locking occurs. The developer must
checking or locking protect variables with the cflock tag. If variables are not
locked, data corruption may result, and server instability may
occur.
Full checking ColdFusion Server checks shared variable scope access
automatically to ensure that it is properly locked. If a data read
or write occurs outside the scope of a cflock tag, an error
displays.
Automatic read ColdFusion Server checks whether shared variable scope
locking writes are locked and automatically locks shared variable
scope reads. If ColdFusion Server encounters shared variable
scope writes that are not locked, an error displays.
install.book Page 78 Thursday, May 10, 2001 12:59 PM

78 Chapter 5 Basic ColdFusion Server Administration

Note
Apply full checking and automatic read locking only to applications that use the
scope attribute, not the name attribute, of the cflock tag to specify locks. If you
specify the name attribute with full checking enabled, ColdFusion Server responds
with an error on a variable accessed within the scope of a cflock tag scope. If you
specify the name attribute with automatic read locking enabled, ColdFusion Server
responds with errors for writes, and possibly a deadlock for reads.
install.book Page 79 Thursday, May 10, 2001 12:59 PM

Mappings 79

Mappings
You use the Mappings page of the ColdFusion Administrator to add, update, and
delete logical aliases for paths to directories on your server and to change the root
"/" mapping. This alias usually points to the Web root.
ColdFusion mappings apply only to pages processed by the ColdFusion Server with
the cfinclude and cfmodule tags. If you save CFML pages outside of the Web root
(or whatever directory is mapped to "/"), you must add a mapping to the location of
those files on your server.
For example, let’s assume that the "/" mapping on your server points to c:\wwwroot,
but all CFML pages associated with your online store reside in e:\store. For the CFML
pages that sit in the c:\wwwroot, you want to reference the online store pages using /
store in your cfinclude and cfmodule tags. In order for ColdFusion Server to find
those pages, you must add a mapping for /store that points to e:\store.

To add a mapping:
1 In the Logical Path text box, enter an alias to assign to a directory, such as /store.
2 In the Directory Path text box, enter the directory for which to create an alias,
such as e:\store. To locate the directory name, click Browse Server or enter the
directory name.
3 Click Add Mapping.
The Active ColdFusion Mappings table shows the new mapping.

To update a mapping:
1 In the Active ColdFusion Mappings table, click a logical or directory path.
2 To update a logical or directory path, edit the information in the appropriate
field, then click Update Mapping.
The Active ColdFusion Mappings table shows the updated mapping and the original
mapping.

To delete a mapping:
In the Active ColdFusion Mappings table, select a mapping to delete. Click Delete
Mapping. The mapping disappears immediately.
install.book Page 80 Thursday, May 10, 2001 12:59 PM

80 Chapter 5 Basic ColdFusion Server Administration

Mail/Mail Logging
You use the ColdFusion Administrator Mail page of the ColdFusion Administrator to
specify a mail server to send automated e-mail messages. ColdFusion Server
supports the Simple Mail Transfer Protocol (SMTP) for sending e-mail and the Post
Office Protocol (POP) for retrieving e-mail from your mail server. To use e-mail
messaging in your ColdFusion applications, you must have access to an SMTP server
and/or a POP account.
The ColdFusion implementation of SMTP mail uses a spooled architecture. This
means that when a cfmail tag is processed in an application page, the messages
generated may not be sent immediately. If ColdFusion is extremely busy or has a
large queue, delivery could occur after some delay.

Note
For more information about the cfmail tag, see the Developing ColdFusion
Applications book.

To configure a mail server:


1 On the ColdFusion Administrator Mail page, enter a mail server for sending
dynamic SMTP mail messages. You can enter an Internet address, such as
mail.company.com, or the IP address of a mail server, such as 127.0.0.1.
2 To cause ColdFusion Server to verify the connection to the mail server, select
Verify Mail Server Connection. If the connection fails, you receive an error
message.
3 In the Server Port text box, enter the mail server port number. The default value
(25) is usually correct. If you are unsure of the appropriate port number, contact
your server administrator.
4 In the Spool Interval text box, enter the interval, in seconds, at which you want
the mail server to process spooled mail.
5 In the Connection Timeout box, enter the number of seconds ColdFusion Server
waits for a response from the mail server.
6 Click Submit Changes.

Tip
Send a test e-mail message to verify that the e-mail server is working, regardless
of whether you enable the Verify Mail Server Connection option.
install.book Page 81 Thursday, May 10, 2001 12:59 PM

Mail/Mail Logging 81

Mail Logging
Select preferences for handling mail logs, as described in the following table:

Setting Description
Error Log Severity From the drop-down list box, select the type of SMTP-related
error message to write to a log file. The options are: Warning,
Information, and Error.
Log all e-mail To have the content of all e-mail messages that ColdFusion
messages sent by Server generates written to a log file, enable this option.
ColdFusion

ColdFusion Server writes sent mail and mail error logs to the file:
• \cfusion\Log, in Windows
• \opt\coldfusion\log, in Solaris, Linux, and HP-UX
The following table describes the e-mail log files:

Log Description
mailsent.log Records sent e-mail
mail.log Records general e-mail errors
install.book Page 82 Thursday, May 10, 2001 12:59 PM

82 Chapter 5 Basic ColdFusion Server Administration

Data Sources
The Data Sources section of the Administrator is the interface between you,
ColdFusion Server, databases, and Verity search and indexing features. The
following table describes some common tasks that you can perform in the Data
Sources sectionof the Administrator:

Task Description
Create and manage The ODBC Data Sources page lets you establish, modify, and
ODBC data delete ODBC data source connections for ColdFusion Server.
sources For more information, see “Managing Data Sources” on page
109.
Create and manage The Native Data Sources page lets you establish, modify, and
native data sources delete native data source connections for ColdFusion Server.
For more information, see the Advanced ColdFusion
Administration book.
Create and The Verity Collections page lets you create and delete Verity
maintain Verity collections and perform maintenance operations on collections
collections that you create. For more information, see “Verity Collections”
on page 83.
Register a Verity K2 The Verity K2 Server page lets you register a K2 Server to use
Server with with ColdFusion Server. For more information, see the
ColdFusion Server Advanced ColdFusion Administration book.
install.book Page 83 Thursday, May 10, 2001 12:59 PM

Verity Collections 83

Verity Collections
The Verity Development Kit (VDK) provides indexing and searching technology to
create, populate, and manage collections of indexed data that are optimized for fast
and efficient site searches. It is available on the Verity Collections page.
A collection is a logical group of documents and metadata about the documents. The
metadata includes word indexes, an internal documents table of document field
information, and logical pointers to the document files.

To use Verity searching in ColdFusion applications, you must:


1 Create a Verity collection.
2 Populate a collection with data.
3 Build searching and indexing capability, using the cfindex and cfsearch tags,
into your ColdFusion application.

To create a collection:
1 On the Verity Collection page, in the Name Field, enter a name for your
collection. The name can consist of multiple words and spaces.
2 In the Path field, specify a path for the collection files.
3 From the drop-down Language list box, select a language for the collection.
4 Click an option:

Option Description
Create New Generates a new collection
Collection
Map Existing Connects a new mapping to a collection that was created outside
Collection ColdFusion Server or copied from another ColdFusion Server.
After the collection is referenced on this page, ColdFusion
searching and indexing tags can reference it.

5 Click Submit Changes.


When you add the first Verity collection, buttons for managing Verity collections
display along the bottom of the table. For instructions about using these buttons, see
“Managing collections” on page 84.

Note
Mapped collections are sometimes confused with external collections. An external
collection is created with a tool other than ColdFusion Server, such as the Verity
command line tool mkvdk. External collections are then associated with ColdFusion
Server so that it can identify the collection and its directory structure.
install.book Page 84 Thursday, May 10, 2001 12:59 PM

84 Chapter 5 Basic ColdFusion Server Administration

To populate a collection:
1 On the Verity Collections page, in the Connected Verity Collections table, select a
collection to populate.
2 Click Index. The ColdFusion Administrator page displays with the selected
collection name at the top.
3 Review the extensions in the File Extensions field. If necessary, add, edit, or
remove extensions for files in the collection.
4 In the Directory Path field, enter the path to the directory to index.
5 To include subdirectories of the directory, select Recursively Index Sub
Directories.
6 In the Return URL field, enter a URL to which to return documents found in the
search of this collection, such as http://localhost/cfdocs.
7 From the Language drop-down list, select the language of the documents.

Note
By default, the Verity English Language Pack installs with ColdFusion Server. To
select another language, install the corresponding Verity Language Pack. The
Verity Language Packs are included on the ColdFusion Server CD-ROM.

8 Click Submit Changes.


ColdFusion Server populates the collection with data from the specified directory.

Building searching and indexing capabilities


For more information about building search interfaces, see the chapters about the
cfindex, cfsearch, cfcollection tags in the Developing ColdFusion Applications
book.
For faster searching, establish a Verity Server link in the Administrator to take
advantage of the Verity K2 Server. This server caches collection information so that
data is retrieved more quickly when searches are run with the cfsearch tag. The K2
Server delivers rapid search results in a highly efficient and scalable architecture.
For more information on using the VDK and K2 Server with ColdFusion Server, see
the Advanced ColdFusion Administration book.

Managing collections
You can repair, optimize, purge, or delete Verity collections that are connected to the
ColdFusion Server. To manage collections, use the buttons along the bottom of the
Connected Verity Collections table.
install.book Page 85 Thursday, May 10, 2001 12:59 PM

Verity Collections 85

Note
Before performing management operations, ensure that the K2 Server is not using
the collections. For more information, see the K2 Server documentation in Advanced
ColdFusion Administration book.

The following table describes the options:

Option Description
Repair Re-indexes a collection to fix broken links and update indexes
Optimize Reclaims space left by deleted and changed files by consolidating
collection indexes for faster searching. Optimize collections regularly
Purge Deletes all documents in a collection, but not the collection itself. Leaves
the collection directory structure intact
Delete Deletes a collection

To repair a collection:
1 On the Verity Collections page, select a collection from the Connected Verity
Collections table.
2 Click Repair. A message warns you not to work on the collection during the repair
process, which can occur over several minutes.
3 Click OK.
When you repair a collection, a confirmation statement displays above the table.

To optimize a collection:
1 On the Verity Collections page, select a collection from the Connected Verity
Collections table.
2 Click Optimize. A message prompts you to verify the process, which can occur
over several minutes.
3 Click OK.
When the optimization is complete, a confirmation statement displays above the
table.

To purge a collection:
1 On the Verity Collections page, select a collection from the Connected Verity
Collections table.
2 Click Purge. A verification message warns you that purging of data cannot be
undone.
3 Click OK.
When the purge is complete, a confirmation statement displays above the table.
install.book Page 86 Thursday, May 10, 2001 12:59 PM

86 Chapter 5 Basic ColdFusion Server Administration

To delete a collection:
1 On the Verity Collections page, select a collection from the Connected Verity
Collections table.
2 Click Delete. A verification message displays warns you that deleting a collection
cannot be undone.
3 Click OK.
When the delete is complete, a confirmation statement displays above the table.

Verity supported file types


The ColdFusion VDK implementation supports the document types listed below:

Document Type Format or Program Version


Text HTML, CFML, DBM, SGML, Not applicable
XML, ANSI, ASCII, Plain Text
Word processing Adobe Acrobat (PDF)* All
Applix Words 4.2
Lotus AMI Pro 2.3
Lotus AMI Pro Write Plus All
Lotus Word Pro 96, 97
Microsoft Rich Text Format 1.x, 2.0
(RTF)
Microsoft Word for Windows 2, 6, 95, 97, 2000
Microsoft Word for DOS 4, 5, 6
Microsoft Word for Macintosh 4, 5, 6
Microsoft Works All
Microsoft Write All
WordPerfect 5.x, 6, 7, 8
WordPerfect for Macintosh 2, 3
XYWrite 4.12
Unicode Not Applicable
Spreadsheet Applix Spreadsheets 4.2, 4.4
Corel QuattroPro 7, 8
Lotus 1-2-3 2, 3, 4, 5, 96, 97
Microsoft Excel 3, 4, 5, 96, 97, 2000
Microsoft Works All
* Not Supported in Linux.
install.book Page 87 Thursday, May 10, 2001 12:59 PM

Verity Collections 87

Document Type Format or Program Version


Presentation Corel Presentations 7.0, 8.0
Lotus Freelance 96, 97
Microsoft PowerPoint 4.0, 95, 97, 2000
* Not Supported in Linux.
install.book Page 88 Thursday, May 10, 2001 12:59 PM

88 Chapter 5 Basic ColdFusion Server Administration

Debug Settings
You use the Debug Setting and Debugging IPs pages of the Administrator to
configure ColdFusion Server to provide debugging information for every application
page requested by a browser. You specify debugging preferences using these pages:
• On the Debugging Options page, select debugging output options. If debugging
is enabled, the output appears in block format after normal page output.
• On the Debugging IPs page, restrict access to debugging output. If a debugging
option is enabled, debugging output is visible to all users by default.

Debug Options
The Debugging Options page provides these debug options:

Option Description
Enable Performance Monitoring* The standard NT Performance Monitor application
displays information about a running ColdFusion
Server. On platforms that do not support the NT
Performance Monitor, a command line utility,
cfstat, displays the same information.
Enable CFML Stack Trace Displays the CFML tags that were executing at the
time of the exception.
Show Variables Displays the names and values of CGI, URL, form
and cookie variables.
Show Total Processing Time Displays the average time, in milliseconds, that it
takes to process a page request.
Show Detailed Processing Time Displays the time, in milliseconds, that it takes to
Breakdown* process each page.
Show SQL and Data Source Displays the data source name and the SQL
Name statement in database query error messages.
Show Query Information Displays the number of records, processing time,
and SQL statement for each query executed.
Display the Template Path in Displays the file name of a template. The name is
Error Messages useful in debugging. However, use of this option
can pose a security hazard because it displays
information about a server’s file structure.
* Restart ColdFusion Server in Windows after selecting this option.
install.book Page 89 Thursday, May 10, 2001 12:59 PM

Debug Settings 89

Debugging IPs
You use the Debugging IPs page to restrict debugging output to one or more IP
addresses. You can add and remove IP addresses.

Warning
If you do not specify IP addresses and debugging options are active, debug output
displays for all users.

To allow debug output to an IP address:


1 On the Debugging IPs page, enter an IP address. Click Add.
2 To add the IP address of the computer you are using, click Add Current.

To disable debug output to an IP address:


1 On the Debugging IPs page, select an IP address.
2 Optionally, repeat Steps 1 and 2 for other addresses.
3 Click Remove.
install.book Page 90 Thursday, May 10, 2001 12:59 PM

90 Chapter 5 Basic ColdFusion Server Administration

Automated Tasks
You use the Automated Tasks pages of the Administrator to schedule the execution
of local and remote Web pages and to generate static HTML pages. The scheduling
facility is useful for applications that do not require user interactions or customized
output. ColdFusion developers use this facility to schedule daily sales reports,
corporate directories, statistical reports, and so on.
Information that is more often read than written is a good candidate for scheduled
tasks. Instead of executing a query to a database every time the page is requested,
ColdFusion Server renders the static page with information generated by the
scheduled event. Response time is faster because no database transaction takes
place.
You can run scheduled tasks once; on a specified date; or at a specified time, daily,
weekly, or monthly. You can run a scheduled task daily, at a specified interval, or
between specified dates.
You create scheduled tasks and set automation options on these pages:
• On the Automation Settings page, you select debugging options
• On the Schedule Task page, you create, modify, and delete scheduled tasks

Automation Settings
The Automation Settings page of the Administrator provides these options:

Option Description
Scheduler Refresh Interval x The time that ColdFusion Server waits before
Minutes* checking for new or updated scheduled tasks
Enable Logging Logs scheduled task actions to the schedule.log or
file
* This option takes effect after you restart ColdFusion Server.

Schedule Task
The Schedule Task page lets you create, modify, and delete scheduled tasks.

To create a scheduled task:


1 Click Schedule New Task. The Add/Edit Scheduled Task page displays.
2 In the Task Name text box, enter a name for the scheduled task.
3 In the Start Date text box, enter the current date or a future date. (Optional) In the
End Date text box, enter a date for the scheduled task to stop running.
install.book Page 91 Thursday, May 10, 2001 12:59 PM

Automated Tasks 91

4 In the Schedule to Run section, select one of the options described in the
following table:

Option Description
One Time Runs the task once, at a time (HH:MM:SS) in 24 hour format
specified in the Start Time text box on the date (MM/DD/YY)
specified in the Start Date text box. For the task to execute
successfully, the date and time must be set at least 15 minutes in
the future.
Recurring Runs the scheduled task according to the frequency specified in
the drop-down list. You can run the task daily, weekly, or monthly.
Specify a time (HH:MM:SS), in 24 hour format, for the scheduled
task.
Daily Runs the scheduled task daily. To run the scheduled task
indefinitely:
• In the Daily Every text box, designate the frequency that the
task runs
• Leave the From and To text boxes empty
To start a scheduled task on a specific date and run it indefinitely:
• In the Daily Every text box, designate the frequency, in
minutes, that the task runs
• In the From text box, enter the start date (MM/DD/YY) and
leave the To text box empty
To run a scheduled task between two dates:
• In the Daily Every text box, designate the frequency, in
minutes, that the task runs
• In the From text box, enter the start date (MM/DD/YY) and the
stop date (MM/DD/YY) in the To text box

5 In the Operation drop-down list, select an operation for the scheduled task to
perform. HTTPRequest is the only option.
6 If your Web server requires a port to connect to the Web, enter it in the Port text
box.
7 In the URL text box, enter a local or remote URL to the file that the scheduled task
executes. For external URLs, end the URL with a backslash.
8 Click Submit Changes.
The scheduled task displays in the Scheduled Task table on the Schedule Task page.
install.book Page 92 Thursday, May 10, 2001 12:59 PM

92 Chapter 5 Basic ColdFusion Server Administration

The following table lists the optional settings in the Schedule Task page:

Setting Description
Username Specifies whether the server to which the URL points requires user
authentication
Password Specifies whether the server to which the URL points requires user
authentication
Request A time, in seconds, to wait for a reply
Timeout
Proxy Server The location of the proxy server
Proxy Port The port of the proxy server
Publish Saves the results of the scheduled task as a static HTML file
Path The file path to the directory in which to save the static HTML file
File The name for the static HTML file
Resolve URL Converts relative URLs in the static HTML file to absolute URLs

To modify a scheduled task:


1 On the Schedule Task page, in the Contents column of the Scheduled Task table,
click a task name. The Add/Edit Scheduled Task page displays.
2 Change the settings.
3 Click Submit Changes.
The modified schedule task displays in the Schedule Task page.

To delete a scheduled task:


1 On the Schedule Task page, in the Contents column of the Scheduled Tasks table,
click the Delete icon of the scheduled task.
2 A verification message warns you that deleting the task cannot be undone. Click
Yes.
The scheduled task disappears.
install.book Page 93 Thursday, May 10, 2001 12:59 PM

Extensions 93

Extensions
You use the Extensions pages of the Administrator to configure ColdFusion Server to
work with other technologies, such as Java and CORBA. These pages make up the
Administrator Extensions section:
• JVM and Java Settings
• Java Applets
• CFX Tags
• Custom Tag Paths
• CORBA Connectors

JVM and Java Settings


The JVM and Java Settings page lets you specify settings that enable ColdFusion
Server to work with Java:

Setting Description
Java Virtual Machine Path The absolute file path to the location of the Java
virtual machine (JVM): jvm.dll in Windows or jvm.so
in Solaris, Linux, and HP-UX
Initial Heap Size JVM initial heap memory size
Max Heap Size JVM maximum heap memory size
Load JVM When Starting Loads the JVM when ColdFusion Server starts up. If
ColdFusion not selected, the JVM loads on the first client request
that requires Java.
Class Path The file paths to the directories that contain the Java
classes used by ColdFusion Server: separate paths
by semi-colons in Windows, or colons in Solaris,
Linux, and HP-UX
System Options Standard JVM initialization options, as name-value
pairs: separate options by semi-colons in Windows
and colons in Solaris, Linux, and HP-UX
Implementation Options Implementation-specific JVM initialization options, as
name-value pairs separated by spaces
CFX Jar Path File path to the ColdFusion cfx.jar file that contains
interfaces used by Java CFX tags

When finished, click Submit Changes.


install.book Page 94 Thursday, May 10, 2001 12:59 PM

94 Chapter 5 Basic ColdFusion Server Administration

Java Applets
The Java Applets page of the Administrator lets you register applets and modify and
delete applet registrations. Before you can use Java applets in your ColdFusion
applications, you must register them in the Java Applets page.
When your applet is registered with ColdFusion Server, using the cfapplet tag in
your CFML code is very simple, because all parameters are predefined. Simply enter
the applet source and the form variable name you want to use.

Note
Parameters set in the cfapplet tag override parameters defined in the Java Applets
page.

To register a Java applet:


1 On the Java Applets page, click Register New Applet. The Add/Registered Applet
page displays.
2 Enter options for the following settings:

Setting Description
Applet Name Applet name
Code Name of the file that contains the applet subclass. Must be
relative to the code base URL. The class extension is optional.
Code Base Base URL of the applet: directory that contains the applet
components. The applet class files must be located within the
Web server root directory, such as http://servername/classes
Archive File name for the applet archive
Method Method name in the applet that returns a string value. You use the
name in the NAME attribute of the cfapplet tag to populate a
form variable with the method value. If the applet has no method,
leave this field blank.
Height Applet height, in pixels
Width Applet width, in pixel
VSpace Measurement, in pixels, for the space above and below the applet
HSpace Measurement, in pixels, for the space on each side of the applet
Align Applet alignment
Not Supported Message to display if the user’s Web browser does not support
Message Java applets. To override this message, specify a different one in
the cfapplet tag notsupported attribute.
Parameter Name for a required applet parameter, typically provided by the
Name applet.
Value Default value for parameter
install.book Page 95 Thursday, May 10, 2001 12:59 PM

Extensions 95

The Java applet displays in the Registered Java Applets table on the Java Applets
page.

To modify a Java applet registration:


1 In the Registered Java Applet page, click a Java applet name.
2 In the Add/Registered Java Applet page, change any setting.
3 Click Submit Changes.
The modified applet displays in the Registered Java Applets table on the Java Applets
page.

To delete a Java applet registration:


In the Registered Java Applets table, click the Delete Applet icon in the Controls
column in the row of the applet you want to delete. The applet disappears.

CFX Tags
Before you can use a CFX tag in ColdFusion applications, you must register it. You
use the CFX Tags page to register and manage ColdFusion custom tags built with
C++ and Java.
You build CFX tags:
• Using C++ as a dynamic link library (DLL) in Windows; as shared objects (so/sl)
on Solaris, Linux, and HP-UX
• Using Java interfaces defined within cfx.jar

To register a C++ CFX tag:


1 On the CFX Tags page, click Register C++ CFX. The Add/Edit C++ CFX Tag page
displays.
2 Enter options for the following settings:

Setting Description
Tag Name Tag name, which must be prefixed with CFX_
Server Library File path for the library or shared object
(.DLL/.SO/.SL)
Procedure Procedure name that implements the tag, which must correspond
with the procedure name in the library or shared library
Keep Library Prevents ColdFusion Server from reloading the library into
Loaded memory each time it is accessed
Description Description for the CFX tag

3 Click Submit Changes.


The CFX tag displays in the Registered CFX Tags table on the CFX Tags page.
install.book Page 96 Thursday, May 10, 2001 12:59 PM

96 Chapter 5 Basic ColdFusion Server Administration

To register Java CFX tag:


1 On the CFX Tags page, click Register Java CFX. The Add/Edit Java CFX tag page
displays.
2 Enter options for the following settings;

Setting Description
Tag Name Tag name, which must be prefaced with CFX_
Class Name File name for the Java class, with no .class extension
Description Description for the CFX tag

Note
The class file must be accessible from the Class Path set in the JVM and Java
Settings page.

3 Click Submit Changes.


The CFX tag displays in the Registered CFX Tags table on the CFX Tags page.

To modify a CFX tag registration:


1 On the CFX Tags page, click a CFX tag name in the Registered CFX Tags table.
2 In the Add/Edit CFX/Java CFX Tag page, change any setting.
3 Click Submit Changes.
The modified CFX tag appears in the Registered CFX Tags table on the CFX Tags page.

To delete a CFX tag registration:


In the Registered CFX Tags table, click the Delete Applet icon in the Controls column
of the row for the CFX tag you want to delete. The CFX tag disappears.

CFX tag samples


Source code and compiled versions of two sample CFX tags are installed with
ColdFusion Server. You must first compile this code before registering the DLLs or
shared objects in the Administrator. The examples can be found in:
• /opt/coldfusion/cfx/examples, in Solaris, Linux, and HP-UX
• cfusion\cfx\examples, in Windows
The CFX tag examples installed with ColdFusion Server are:
• directorylist — returns a directory listing
• nt_userdb — modifies Windows NT and Windows 2000 user permissions
install.book Page 97 Thursday, May 10, 2001 12:59 PM

Extensions 97

Custom Tag Paths


You use the Custom Tag Paths page of the Administrator to add and delete custom
tag directory paths. You must register the directories that contain custom tags.

To add a custom tag path:


1 On the Custom Tag Paths page, enter the file path to the directory that contains
custom tags, or click Browse Server to navigate to the directory.
2 Click Add Path.
The path displays on the Custom Tag Paths page.

To delete a custom tag path:


1 Select a tag path to delete.
2 Click Delete.
The path disappears.

CORBA Connectors
You use the CORBA Connectors page of the Administrator to register, modify, and
delete CORBA connectors. You must register CORBA connectors before using them
in your ColdFusion applications.
ColdFusion Server loads Orb libraries dynamically using a connector, which does not
tie ColdFusion customers to a specific Orb vendor. The connectors depend on the
Orb runtime libraries provided by the vendor. The connectors are located in the bin
directory in Windows and the lib directory in Solaris and HP-UX. Ensure that the
appropriate libraries reside in the load library search path for the ColdFusion
executable.
The following table contains information about the libraries and connectors:

Operating Vendor Orb ColdFusion Orb


System Connector Libraries
Windows NT 4.0 Inprise VisiBroker 3.3 cf_vb33.dll orb_r.dll
name_r.dll
Solaris 7 Inprise VisiBroker 4.0 cf_vb40.so liborb_r.so
libcosnm_r.so
libvport_r.so
HP-UX 11.0 Inprise VisiBroker 3.3 cf_vb33.sl liborb_r.so
libname_r.so
install.book Page 98 Thursday, May 10, 2001 12:59 PM

98 Chapter 5 Basic ColdFusion Server Administration

Note
Macromedia will provide implementations of the connectors for some of the popular
Orbs. For those that are not supported, Macromedia will make the source available
under NDA to a select group of third-party candidates and/or Orb vendors.

To add a CORBA connectors:


1 On the CORBA connections page, click Register CORBA Connector. The New
CORBA Connector page displays.
2 Enter options for the following settings:

Setting Description
ORB Name Orb name (alphanumeric characters only)
DLL Path File path to the DLL that the ORB uses
ORB Initialization Options that are necessary to initialize the ORB, separated by
Options spaces

3 Click Submit Changes.


The ORB connector displays in the Registered CORBA Connectors table on the
CORBA Connectors page.

Note
To instruct ColdFusion Server to load the ORB into memory on startup, select the
Load ORB on Startup check box. Click Submit CORBA Settings.

To modify a CORBA connector registration:


1 In the Registered CORBA Connectors table on the CORBA Connections page,
click a CORBA Connector name. The CORBA Connector page displays.
2 Change any setting.
3 Click Submit Changes.
The modified CORBA connector displays in the Registered CORBA Connector table.

Note
You must restart ColdFusion Server for the changes to take effect.

To delete a CORBA connector registration:


In the Registered CORBA Connectors table, click the Delete Connector icon in the
Controls column of the row for the CORBA connector to delete. The CORBA
connector disappears.
install.book Page 99 Thursday, May 10, 2001 12:59 PM

Security 99

Security
The Security section of the Administrator, accessed by clicking the Security tab at the
top of the left navigation bar, lets you configure the Basic and Advanced Security
frameworks of ColdFusion Server.

Basic Security
The Basic Security framework activates by default during ColdFusion Server
installation, in the Professional and Enterprise editions. It secures ColdFusion Server
in three ways:
• Administrative access — Protects access to Administrator pages with a password
• Application development — Protects access to data sources and files with
passwords and blocks access to some sensitive ColdFusion tags
• Application deployment — Prevents applications from executing several
ColdFusion tags that could be used to update, delete, or manipulate server files
Basic Security provides an adequate level of protection if you have legacy systems, or
other security measures, already in place. On the other hand, developers must spend
more time writing applications, because, while granular runtime access security is
possible with Basic Security, it requires custom development.
For more information, see “Basic Security” on page 100. For more information about
implementing security measures in your ColdFusion applications, see Developing
ColdFusion Applications.

Advanced Security
In ColdFusion Server Enterprise Edition, the Advanced Security framework provides
scalable, granular security in the following ways:
• Application development — It controls access to files, data sources, and
administration for each developer on your team. You coordinate team
development on shared servers with the assurance that sensitive data and
applications are secure.
• Application deployment — It creates complex rules to programmatically control
access to functionality within applications. You can set up multiple levels of user
access within an application, and confine applications to secure areas that
restrict the access applications have to directories, components, databases, or
other resources on the server.
• Administrative access — It assigns different degrees of administrative access to
specified users.
For more information, see the Advanced ColdFusion Administration book. For more
information about implementing security measures in your ColdFusion
applications, see Developing ColdFusion Applications.
install.book Page 100 Thursday, May 10, 2001 12:59 PM

100 Chapter 5 Basic ColdFusion Server Administration

Basic Security
The Basic Security section of the Administrator provides these pages to configure
ColdFusion Server basic security:

Page Description
CF Admin Password Lets you assign and change passwords for the ColdFusion
Administrator
Tag Restrictions Lets you restrict the use of specific tag and tag attributes
CF Studio Password Lets you assign and change passwords for ColdFusion Studio

CF Admin Password
You use the CF Admin Password of the Administrator page to enable and disable
password-restricted access to the Administrator, and to change the Administrator
password.

Note
Enabling Use ColdFusion Administration Authentication in the Advanced Security
page disables the passwords set in the Basic Security page.

To set or change the Administrator password:


1 Ensure Use a ColdFusion Administrator Password is checked.
2 In the New Password text box, enter a new password. In the Confirmation text
box, enter the password again.
3 Click Submit Changes.

Tag Restrictions
You use the Tag Restrictions page of the Administrator to enable and disable tags and
tag attributes, and to specify a directory where tag restrictions are not enforced. Tag
restrictions can be useful to ColdFusion Server hosting providers by preventing
developers from executing tags that could save, change, or delete files on the server.
By default, all tags are enabled when ColdFusion Server is installed. To disable a tag,
clear its check box.
To specify a directory in which otherwise blocked tags can be executed, enter the file
path in the Unsecured Tags Directory text field. The default directory is the
Administrator.
install.book Page 101 Thursday, May 10, 2001 12:59 PM

Basic Security 101

Warning
If you change the directory from the default ColdFusion Server directory and you
disable the cfregistry tag, you cannot use the ColdFusion Administrator. To regain
access to the Administrator, modify the registry to return the directory to normal.

You can restrict access to the following tags:


• cfcontent
• cfdirectory
• cffile
• cfobject
• cfregistry
• cfadminsecurity
• cfexecute
• cfftp
• cflog
• cfmail
You can restrict access to the following tag attributes:
• DBTYPE=DYNAMIC
• CONNECTSTRING

CF Studio Password
You use the CF Studio Password page to enable and disable password-restricted
access to server resources within ColdFusion Studio using Remote Development
Services (RDS), and to change the password.

Warning
Enabling Use ColdFusion Studio Authentication in the Advanced Security page
disables the passwords set in the Basic Security page.

Enabling Use ColdFusion Administration Authentication or Use ColdFusion Studio


Authentication in the Advanced Security page disables the passwords set in the Basic
Security page.

To set or change the ColdFusion Studio password:


1 On the CF Studio Password page, ensure that the Use a ColdFusion Studio
Password is checked.
2 In the New Password text box, enter a new password. In the Confirmation text
box, enter the password again.
3 Click Submit Changes.

Note
If you use ColdFusion RDS, you must stop and restart it after you change passwords.
install.book Page 102 Thursday, May 10, 2001 12:59 PM

102 Chapter 5 Basic ColdFusion Server Administration

Tools
The Tools section of the Administrator, accessed by clicking the Tools tab at the top
of the left navigation bar, provides administrative features in ColdFusion Server
Enterprise Edition, for managing Web site specific files, configurations, and
applications
The following table describes some of the common tasks that you can perform in the
Data Sources section:

Task Description
Analyze and view log file The enhanced log viewer and filter utilities let you to extract
information essential information from one or more log files. For more
information, see “Logs and Statistics” on page 103.
Backup and deploy site The site archiving features let you easily back-up and
information deploy site configuration information, files, and/or
applications. For more information, see the Advanced
ColdFusion Administration book.
Monitor resources, send The monitoring and site management features let you
alarm notifications, and monitor resources in your Web site, be informed when
distribute incoming Web critical events occur, and control the distribution of HTTP
traffic traffic hitting your Web sites. for more information, see the
Advanced ColdFusion Administration book.
Examine site The Server Reports page lets you examine ColdFusion
performance statistics Server performance statistics over a period of time, track
and server configuration ColdFusion Server configuration changes as they occur,
changes and identify all current configuration settings from one view.
For more information, see “Server Reports” on page 107.
install.book Page 103 Thursday, May 10, 2001 12:59 PM

Logs and Statistics 103

Logs and Statistics


The Logs and Statistics section of the Administator includes pages that help you
monitor ColdFusion Server and ColdFusion application activity. The following table
describes these pages:

Page Description
Logging Settings Lets you configure administrator e-mail address, change the log
directory, control operating system logging, and enable log file
format
Log files Lets you search, view, download, archive, and delete log files
Server Reports Lets you view and filter dynamically generated reports*
* Available only in ColdFusion Server Enterprise Edition. Not available in
HP-UX.

Logging Settings
You use the Logging Settings page of the Administrator to change ColdFusion Server
logging options. The following table describes the settings:

Setting Description
Administrator E-mail address of the server administrator. The address displays
E-mail under each error message, for reporting purposes, enabling users
to report problems. This setting can be overridden in the
Application.cfm file.
Log Directory* Directory to which error log files are written.
Log Slow Pages Causes ColdFusion Server to log the names of pages that take
longer than the specified interval to process. Logging slow pages
can help you diagnose potential problems or bottlenecks in your
ColdFusion applications. Entries are written to server.log.
Use Operating Causes ColdFusion Server to log messages using your operating
System Logging system logging facility (EventLog in Windows; syslog in Solaris,
Facilities Linux, and HP-UX). ColdFusion Server log messages are also
written to the standard ColdFusion Server log files.
Use Version 5 Causes all ColdFusion Server log messages to be written in a
Logging Format* standard format. The standard format is required to use the
enhanced 5 Log Viewer. If not enabled, ColdFusion Server uses
the version 4.5 format. If you do not use ColdFusion Server 5
format, the Administrator Log Viewer does not work.
* Restart ColdFusion Server after changing this setting.
install.book Page 104 Thursday, May 10, 2001 12:59 PM

104 Chapter 5 Basic ColdFusion Server Administration

Log files
The Log Files page of the Administrator lets you perform operations on log files, such
as viewing, downloading, scheduling, archiving, and deleting.
The Log File page icons, located in the Controls column of the Available Log Files
table, can be used to perform all log file actions. The following diagram describes the
icons:

To view a log file:


In the Available Log Files table, click the View/Search Log File icon. The Log Viewer
displays. In the Log Viewer page, the log file displays. You can filter the log by
keyword, severity, application, thread ID, and time frame.
or
1 Select the checkbox of a log file.
2 Click View Log Files.

Note
For more information on filtering log files, see the Administrator Online Help.

To download a log file:


In the Available Log Files table, click the Download Log File icon for a log file.

To schedule the archive of a log file:


In the Available Log Files table, click the Schedule Archive of Log File icon for a log
file. The Add/Edit Scheduled Task page displays.
install.book Page 105 Thursday, May 10, 2001 12:59 PM

Logs and Statistics 105

To archive a log file:


In the Available Log Files table, click the Archive Log file icon for a log file. The
archive disappears from the Available Log File table. The log is saved in the log
directory of ColdFusion Server

To delete a log file:


In the Available Log Files table, click the Delete Log File icon for the log file. A
confirmation page displays. Click Yes.
ColdFusion Server generates several log files. By default, it writes log files to:
• \cfusion\log, in Windows
• /opt/coldfusion/log, in Solaris, Linux, and HP-UX

ColdFusion Server log files


ColdFusion Server log files are described in the following table:

Log Description
executive.log Records errors related to the ColdFusion Application Server
service. If the service restarts or is unable to access the
system registry, the information is written to executive.log.
rdseservice.log Records errors occurring in the ColdFusion Remote
Development Services (RDS). This service provides remote
HTTP-based access to files and databases.
application.log Records every ColdFusion Server error reported to a user.
Application page errors, including ColdFusion Server syntax,
ODBC, and SQL errors are written to the log file.
webserver.log Records errors that occur in the Web server and the
ColdFusion Server stub.
scheduler.log Records scheduled events that have been submitted for
execution. Indicates whether task submission was initiated
and whether it succeeded. Provides the scheduled page
URL, the date and time executed, and a task ID.
server.log Server log that records errors for ColdFusion Server.
customtag.log Server log that records errors generated in custom tag
processing.
remote.log Server log that records messages associated with the
Network Listener Module (cfdist).
car.log Records errors associated with Site Archive and Restore
operations.
mail.log Records errors generated by a SMTP mail server.
mailsent.log Records messages sent by ColdFusion Server.
* Solaris, Linux, and HP-UX only.
install.book Page 106 Thursday, May 10, 2001 12:59 PM

106 Chapter 5 Basic ColdFusion Server Administration

Log Description
proxy.log Records messages related to the security server proxy.
cfadmin.log Records Administrator operations.
install.log* Records installation information.
server.stdout* Records the standard output of the cfserver process.
rdsservice.stdout* Records the standard output of the cfrdsservice process.
* Solaris, Linux, and HP-UX only.

ColdFusion Server log file format


ColdFusion Server supports the following log file formats:
• ColdFusion Server 5 format
• ColdFusion Server 4.5 and earlier format

ColdFusion Server 5 format


By default, ColdFusion Server generates a new log file format, which includes
information for each log file event recorded. The following table describes the layout:

Column Field Type Field Description


1 Date The date that the event occurred
2 Time The time that the event occurred
3 Severity The severity level:
• Fatal
• Error
• Warning
• Informational
4 Thread ID The service thread identification number
5 Application The name of the application in which the event occurred
Name
install.book Page 107 Thursday, May 10, 2001 12:59 PM

Logs and Statistics 107

ColdFusion Server 4.5 and earlier format


ColdFusion Server 4.5 and earlier releases used file formats in which each column
was enclosed by a set of quotation marks. The following table describes the layout:

Column Field
Order Type Field Description
1 Severity Severity level:
• Error
• Warning
• Informational
2 Thread ID The service thread identification number
3 Date The date the event occurred
4 Time The time the event occurred
5 Details Describes the event that occurred, with error number

Note
If you use ColdFusion Server 4.5 or earlier or earlier, you cannot view log files in the
Log Viewer.

Server Reports
You use the Server Reports page of the Administrator to view dynamically generated
reports about server activity and performance. The following reports are available:
• Statistics Summary
• Requests
• Database Operations
• Cache Pops
• Queued Requests
• Requests in Progress
• Timed Out Requests
• Throughput
• Settings Summary
• Settings Change Log
When you click on a report, the right pane of the Server Reports page displays your
choices. The Settings Summary and Settings Change Log reports contain hyperlinks
to the applicable page in the Administrator.
For example, if you made a change to the log directory on 07/01/2001, the change is
listed in the report as "Logging -> Log Directory". You can click on "Logging -> Log
Directory" to go directly to the Logging Settings page in the Administrator.
install.book Page 108 Thursday, May 10, 2001 12:59 PM

108 Chapter 5 Basic ColdFusion Server Administration

You can filter server reports by time frame, dates, and interval. The following table
lists the options:

Parameter Option
Timeframe • Anytime
• Specified Range (used in conjunction with Dates option)
• Today
• Last Two Days
• Last Three Days
• One Week
• Two Weeks
• One Month
• Three Months
• Six Months
Dates Enter past dates in MM/DD/YYYY format, such as 06/01/2001 to
07/01/2001.
Interval • Hour
• Day
• Week
• Month

Click Update to apply your changes.


install.book Page 109 Thursday, May 10, 2001 12:59 PM

Chapter 6

Managing Data Sources

ColdFusion allows you to rapidly develop dynamic Web applications—that is,


applications that interact with databases. Before you can use a database in a
ColdFusion application, you must register the data source in the ColdFusion
Administrator. This chapter describes how to create and configure ColdFusion data
sources for SQL Server, Access, and Oracle databases. For details on how to configure
data sources for other databases, see Advanced ColdFusion Server Administration.

Contents
• About ColdFusion Data Sources ............................................................................ 110
• Supported Database Drivers .................................................................................. 111
• Choosing the Correct Drivers................................................................................. 114
• Adding Data Sources for ColdFusion..................................................................... 115
• Verifying ColdFusion Data Sources ....................................................................... 120
• Connecting to Microsoft SQL Server Databases................................................... 121
• Connecting to Microsoft Access Databases .......................................................... 123
• Connecting to Oracle Databases............................................................................ 127
install.book Page 110 Thursday, May 10, 2001 12:59 PM

110 Chapter 6 Managing Data Sources

About ColdFusion Data Sources


For ColdFusion developers, the term data source can refer to a number of different
types of structured content accessible locally or across a network. You can query
Web sites, LDAP servers, POP mail servers, and documents in a variety of formats.
Most commonly though, a database drives your applications, so for this discussion, a
data source is defined as the entry point for database operations.
Before you can access a database with a ColdFusion application, you must configure
the database as a ColdFusion data source or use an existing ODBC data source. You
do this using the Data Sources page in the ColdFusion Administrator.

Note
On the Win32 platform, you can also configure ODBC data sources with the ODBC
Data Source Administrator.

The specific databases that you can configure for ColdFusion depend on two items:
• The platform on which you install ColdFusion Server
• The edition of ColdFusion that you are running—Professional or Enterprise.
When you first open the ColdFusion Administrator, you see four ODBC data sources
already configured for use by ColdFusion:
• cfsnippets Used by the executable code examples. You access the examples
through pages in the CFML Language Reference and through the Snippets
Launcher, which you access from the ColdFusion welcome page.
• cfx Used by the example applications optionally installed with ColdFusion
Server.
• CompanyInfo Used by the examples in Developing Web Applications with
ColdFusion.
• GlobalCorpDB Used by the example applications optionally installed with
ColdFusion Server.

Installing and Configuring ColdFusion Server


install.book Page 111 Thursday, May 10, 2001 12:59 PM

Supported Database Drivers 111

Supported Database Drivers


ColdFusion uses Open DataBase Connectivity (ODBC), OLE DB, and native database
drivers to interact with data sources. However, not all ColdFusion Server editions
support all database drivers. ColdFusion Professional edition is limited to ODBC on
Linux and to ODBC and OLE DB on Win32. The following table shows the available
drivers for each ColdFusion edition:

Windows NT
Windows 98

Solaris
Linuxa

HP-UX
Functionality Library name Vendor Version
ODBC
Btrieve DataDirect MERANT 3.7 Pb P
Connect ODBC
FileMaker FileMaker 5.0 P P
dBASE/FoxPro DataDirect MERANT 3.7 P P P E E
Connect ODBC
IBM DB2 UDBc DataDirect MERANT 3.7 E E E E
Connect ODBC
Informix 7.x/9.xd DataDirect MERANT 3.7 E E E E
Connect ODBC
Informix Dynamic DataDirect MERANT 3.7 E E E E
Server for Informix 9.x Connect ODBC
Microsoft SQL Server DataDirect MERANT 3.7 P E E
Connect ODBC
MySQLe DataDirect MERANT 3.6 P E E
Connect ODBC
Oracle 7.3.4 DataDirect MERANT 3.7 E E E
Connect ODBC
Oracle 8 DataDirect MERANT 3.7 E E E E E
Connect ODBC
Paradox DataDirect MERANT 3.7 P P
Connect ODBC
Progress 7.2 DataDirect MERANT 3.7 E
Connect ODBC
SQLbase 6.x DataDirect MERANT 3.7 E E
Connect ODBC
Sybase 11 - Sybase DataDirect MERANT 3.7 E E E E E
Adaptive Server 12.0 Connect ODBC
Text DataDirect MERANT 3.7 P P P E E
Connect ODBC
dBASE MDAC Microsoft P P
install.book Page 112 Thursday, May 10, 2001 12:59 PM

112 Chapter 6 Managing Data Sources

Windows NT
Windows 98

Solaris
Linuxa

HP-UX
Functionality Library name Vendor Version
Microsoft Access MDAC Microsoft P P
Microsoft Excel MDAC Microsoft P P
Microsoft FoxPro MDAC Microsoft P P
Microsoft SQL Server MDAC Microsoft P P
Microsoft Visual MDAC Microsoft P P
FoxPro
Text MDAC Microsoft P P

Native
IBM DB2 Macromedia 5.2.0 E E E E
IBM DB2 Macromedia 6.1 E E E E E
Informix Macromedia 7.x, 9.x E E E E E
Oracle 7.3.4 Macromedia 7.3.0 E E E
Oracle 8.0 Macromedia 8.0.4.0.0, E E E E E
8i
Sybase Macromedia System E E E E E
11, 12

OLE DB
Microsoft.Jet.ODBC MDAC Microsoft 4.0 P P
(8.0.4.0.0 client
libraries)
SQLOLEDB (7.3.3 Microsoft 7.3.0 P P
client libraries)

a. ColdFusion 5 supports Red Hat Linux 6.2 and 7.0, SuSE Linux 7.0, Cobalt
RAQ3, XTR, and RAQ4 Linux.
b. P= ColdFusion Professional Edition; E= ColdFusion Enterprise Edition.
c. DB2 for Windows NT and DB2 Common Server requires either IBM DB2
Client Application Enabler for Win32 version 2.1 or later, or IBM DB2 Soft-
ware Development Kit for Win32 version 2.1 or later. DB2 for Solaris or
HP-UX requires version 2.12 or later.
d. Informix for Windows requires version 2.5 or later of either the Infor-
mix-Connect for Windows or the Informix Software Developer’s Kit for Win-
dows. Informix for Solaris and HP-UX requires Informix-Client Software
Developer’s Kit version 2.5 or later for UNIX.
e. For UNIX, the MySQL driver provided with MyODBC will work. This driver
displays in the drop-down list if it is located at /opt/coldfusion/lib/libmyo-
dbc.so (.s1 for HP-UX).

Installing and Configuring ColdFusion Server


install.book Page 113 Thursday, May 10, 2001 12:59 PM

Supported Database Drivers 113

What to do next
To use an existing database with your ColdFusion applications, you need to register
or create the data source using the ColdFusion Administrator. If you are using a DB2,
Informix, Oracle, or Sybase database and want to take advantage of the ColdFusion
native drivers, you also need to install and configure database client software.
The remaining sections in this chapter provide details about configuring ColdFusion
data sources for Microsoft SQL Server, Microsoft Access, and Oracle databases. To
learn how to connect to other databases, see Advanced ColdFusion Server
Administration.

The following sections apply to all databases and operating systems:

Section and location Description


“Choosing the Correct Drivers” on Describes the types of drivers you can use to
page 114 access data sources with ColdFusion Server
(ODBC, OLE DB, and native) and helps you
decide which driver best suits your needs.
“Adding Data Sources for ColdFusion” Provides instructions for using the
on page 115 ColdFusion Administrator to add a data
source. These instructions apply to all
platforms and drivers.
“Verifying ColdFusion Data Sources” Provides instructions for ensuring that a data
on page 120 source is correctly configured and available
to your ColdFusion application pages.
install.book Page 114 Thursday, May 10, 2001 12:59 PM

114 Chapter 6 Managing Data Sources

Choosing the Correct Drivers


ColdFusion uses ODBC, OLE DB, and native database drivers to communicate with a
wide variety of popular database programs. This section introduces each type of
driver so you can decide which one best suits your needs.

About ODBC drivers


Any valid ODBC data source already installed on your system is automatically
available to your ColdFusion applications. You must also register it as a ColdFusion
data source so that you can configure it with ColdFusion-specific options, such as
the ability to specify SQL operations to restrict for the current data source.
When you create a data source on the Create ODBC Data Source page in the
ColdFusion Administrator, you can configure a number of settings for your ODBC
data source. The options available to you depend on which database driver you are
using. Data source definitions and option settings are stored in the odbc.ini file on
UNIX and in the Registry on Win32 platforms. The main role of the odbc.ini file is to
map a data source name (DSN) to a particular ODBC driver and options.
For detailed information about options specific to your ODBC drivers, see the
documentation that came with your database program or the ODBC driver
documentation, including online Help. For detailed information on the MERANT
ODBC drivers, see the MERANT DataDirect ODBC Reference, which is distributed
with ColdFusion as an Acrobat file. On UNIX machines, this file is installed by default
as: <installdir>/coldfusion/odbc/doc/odbcref.pdf. On Win32 machines, this file is
installed by default as: <installdir>/cfusion/bin/odbcref.pdf.

About OLE DB and native drivers


OLE DB, which is available only on Windows NT/2000, is a Microsoft specification
for a set of interfaces designed to access data, regardless of the data type.
Native database drivers are available for certain databases in ColdFusion Enterprise
Edition. You can access DB2, Informix, Sybase System 11 through Sybase Adaptive
Server 12.0, and Oracle 7.3.4, 8.0, and 8i databases through native database drivers
on both Windows NT and UNIX platforms.
For detailed information about OLE DB and native drivers, see Advanced ColdFusion
Server Administration.

Installing and Configuring ColdFusion Server


install.book Page 115 Thursday, May 10, 2001 12:59 PM

Adding Data Sources for ColdFusion 115

Adding Data Sources for ColdFusion


The process for adding a data source in the ColdFusion Administrator is the same,
whether you use an ODBC, OLE DB, or native driver. The following procedure adds
an ODBC data source that uses a SQL Server driver.

To add a data source to ColdFusion:


1 Open the ColdFusion Administrator.
2 Under Data Sources, click a link to specify a type of data source to add:
• ODBC
• OLE DB (available only on Windows NT/2000)
• Native
The Data Sources page displays Data Source Names (DSNs) of that type that are
available to ColdFusion:

3 Enter a name for the new data source and select a driver from the drop-down list.

Note
Do not name a ColdFusion data source Registry or Cookie; these words are
reserved for use by ColdFusion.

4 Click Add.
install.book Page 116 Thursday, May 10, 2001 12:59 PM

116 Chapter 6 Managing Data Sources

The Create Data Source page displays:

5 Enter the appropriate information about the new data source.


The information that you enter depends on the platform on which you installed
ColdFusion and on the driver you specify. For information about options for your
driver, see the section for your specific database.

Note
For the Server field, if you connect to a local SQL Server database using the
Microsoft SQL Server driver, enclose the word local in parentheses: (local).

Installing and Configuring ColdFusion Server


install.book Page 117 Thursday, May 10, 2001 12:59 PM

Adding Data Sources for ColdFusion 117

6 (Optional) Click CF Settings and specify ColdFusion-specific settings.

For more information, see “ColdFusion Settings” on page 118.


7 Click Create to create the data source.
ColdFusion automatically verifies that it can connect to the data source.

If ColdFusion cannot verify the data source, the Status displays Failed. You can
run a cfquery against a failed data source to get more information about the
problem. You also can try embedding a username and password into the cfquery
tag, to see if the query works.
install.book Page 118 Thursday, May 10, 2001 12:59 PM

118 Chapter 6 Managing Data Sources

Note
You may have to supply a username and password for data sources that you want
to verify. To define a username and password for a data source, edit the data
source properties.

If you are creating a UNIX data source, you may have to set environment variables
for your database client library by editing the ColdFusion start script in <installdir>/
coldfusion/bin. For more information on editing the ColdFusion start script for your
particular database, see Advanced ColdFusion Server Administration.

ColdFusion Settings
To define a number of advanced ODBC and ColdFusion settings in the ColdFusion
Administrator, select a data source and click CF Settings . The settings apply to all
platforms. The following table describes the ColdFusion data source settings:

Setting Description
Login Timeout The number of seconds before ColdFusion times out the
database connection login attempt.
Limit Connections Select this check box, then specify the number of
simultaneous connections to allow for the current data source.
Note: If you enable Limit Connections without specifying a
limit for simultaneous connections, ColdFusion defaults to
unlimited connections.
ColdFusion Login Enter a username and password for accessing the ODBC
data source. Any username and password specified in a
cfquery or other data access tag overrides the values
specified in the ColdFusion login.
When you create a data source using a native database
driver, you use the username and password options to pass
login information to the database.
• Disable database connections Disables connections to
the data source. Use this setting to perform administrative
tasks with the database. You cannot establish new
connections to a disabled data source. ColdFusion
automatically disconnects and cleans up idle connections.
ColdFusion notifies any connection currently in use to
clean itself up when the current transaction is complete. To
restore the connection to the data source, clear this check
box.
• Maintain database connections ColdFusion
establishes a connection to a data source for every
operation that requires it. To improve performance by
caching the database connection, select this check box.

Installing and Configuring ColdFusion Server


install.book Page 119 Thursday, May 10, 2001 12:59 PM

Adding Data Sources for ColdFusion 119

Setting Description
Connection Timeout Specify the maximum number of minutes after the database
connection is made that you want ColdFusion to cache a
connection after it is used.
This is different from the server setting to Limit database
connection inactive time, located under Server Settings >
Caching. The latter setting is server wide and only releases
cached connections that have been inactive (not used) for the
specified period of time.
The Connection Timeout setting does not return a connection
to the cache after a specified period of time, regardless of
how infrequently it is used.
The default is "" or 0, which means the connection timeout is
never enforced.
Restrict SQL Select SQL operations to restrict for the current data source.
Operations to To allow all SQL operations, clear all check boxes. To allow
specific SQL operations, select the check boxes.
Long Text Retrieval Retrieves all the data for a long text field. If you use this
Settings setting, order the columns in your select statement with the
long text fields referenced last.
ColdFusion retrieves the column with the long text field, and
subsequent columns in the select statement, as unbound
data. Unbound data take longer to retrieve than bound data;
therefore, this setting can affect performance.
Long Text Buffer Size If you do not select the Enable retrieval of long text option,
specifies the maximum number of characters to retrieve from
a long text field is not set. In this case, ColdFusion binds text
columns to a buffer whose size you specify in this field. If you
specify a size that is not supported by your database, a SQL
execution error occurs when you try to retrieve the data.
If you select the Enable retrieval of long text option, this is the
buffer size ColdFusion uses to retrieve the unbound text
column until all data is returned.
Connection String Use this setting to pass driver-specific connection attributes
for ODBC data sources. You can:
• Specify connection attributes that cannot be defined in the
odbc.ini settings
• Override odbc.ini settings
• Make ODBC connections dynamically when there is no
data source defined in the odbc.ini settings
install.book Page 120 Thursday, May 10, 2001 12:59 PM

120 Chapter 6 Managing Data Sources

Verifying ColdFusion Data Sources


When you add or update a ColdFusion data source, the ColdFusion Administrator
automatically attempts to verify the connection. A verified connection means that
the data source is available to your ColdFusion application pages. The ColdFusion
Administrator includes a facility for verifying some or all ColdFusion data sources of
a particular type (ODBC, OLE DB, or native drivers) at any time.

Note
You might need to supply a username and password for the data sources that you
want to verify. To define a username and password for a data source, edit the
properties for the data source.

To verify a ColdFusion data source:


1 Open the ColdFusion Administrator.
2 Under Data Sources, click the link that specifies the type of data source that you
want to verify:
• ODBC
• OLE DB (available only on Windows NT/2000)
• Native
3 Verify the data source(s):
• To verify all the data sources listed on the page, click Verify All Connections.
• To verify an individual data source, click Verify in its row.
In the Status field, ColdFusion indicates whether the data source was
successfully verified.

Note
If ColdFusion cannot verify a data source, you can run a cfquery against the failed
data source to get more detailed information about the problem. You can also
embed a username and password into the cfquery tag to test if the query works.

Installing and Configuring ColdFusion Server


install.book Page 121 Thursday, May 10, 2001 12:59 PM

Connecting to Microsoft SQL Server Databases 121

Connecting to Microsoft SQL Server Databases


ColdFusion lets you access SQL Server databases from Windows NT and UNIX, using
ODBC and OLE DB drivers.

Configuring Microsoft SQL Server Options (Windows)


If you install the ColdFusion Server on a Windows NT server, you can configure
Microsoft SQL Server as a ColdFusion data source using an ODBC or an OLE DB
driver. For information about using OLE DB drivers with ColdFusion data sources,
see Advanced ColdFusion Server Administration.
The following table describes ColdFusion ODBC options for Microsoft SQL Server
data sources. You set these options when you configure a ColdFusion data source.

Option Description
Data Source Name A name for your ODBC data source.
Description A short description of the data source.
Server The name of the server hosting the database that you want to
use. If the SQL Server database is local and you are using the
Microsoft SQL Server driver, enclose the word local in
parentheses: (local).
• Use Trusted Connection Allows SQL Server to
authenticate users based on their Windows NT logins. You
can use this option if the SQL Server database uses an
Integrated or Mixed security mode.
Login Info • Database The name of the SQL Server database.
• Language The national language used by SQL Server.
• Generate Stored Procedure for Prepared
Statement Stored procedures are created for prepared
statements when you select this option. The SQL Server
driver prepares a statement by placing it in a procedure and
compiling that procedure.
Translation Convert OEM to ANSI characters Select this option if the
SQL Server client computer and SQL Server are using the
same non-ANSI character set. For example, if SQL Server uses
code page 850 and the client computer uses code page 850 for
the OEM code page, selecting this option ensures that
extended characters stored in the database convert properly to
ANSI for use by Windows-based applications.
install.book Page 122 Thursday, May 10, 2001 12:59 PM

122 Chapter 6 Managing Data Sources

Configuring Microsoft SQL Server Options (UNIX)


If you install ColdFusion Server on a UNIX server, you can configure Microsoft SQL
Server as a ColdFusion data source using an ODBC driver.
The following table describes ColdFusion options for the MERANT MS SQL Server
ODBC driver. You set these options when you configure a ColdFusion data source.

Option Description
Data Source Name A name for your ODBC data source.
Description Descriptive information about the data source.
Database Name The name of the database to which you want to connect.
Server IP Address The IP Address of the server that contains the SQL database
that you want to access.
Server Port The number of the TCP/IP port which the server monitors for
connections.
Create Stored Determines whether stored procedures should be created on
Procedures every call, only if parameters are specified, or never.

Installing and Configuring ColdFusion Server


install.book Page 123 Thursday, May 10, 2001 12:59 PM

Connecting to Microsoft Access Databases 123

Connecting to Microsoft Access Databases


ColdFusion lets you access Microsoft Access databases on Windows NT, using ODBC
and OLE DB drivers. Microsoft Access is a desktop database, and is not intended or
designed for high-volume, multiuser use.
For more information about using Microsoft Access in your application, see the
Knowledge Base article #564, “Using Microsoft Access Databases in a Production
Environment.”For information on securing Access and other file-based databases,
such as dBASE, FoxPro, and Paradox, see Knowledge Base article #10953, “Security
Best Practice: Securing File-based Databases.”

Configuring Microsoft Access Options (Windows)


If you install ColdFusion Server on a Windows NT server, you can configure a
Microsoft Access database as a ColdFusion data source using an ODBC or an OLE DB
driver. For information about using OLE DB drivers with ColdFusion data sources,
see Advanced ColdFusion Server Administration.

Note
OLE DB and ODBC connections to Access function identically at the programmatic
level, but OLE DB connections under load are substantially more robust than ODBC.
Wherever possible, you should use OLE DB instead of ODBC to connect to Access
data sources. For details on how to configure an OLE DB data source, see Advanced
ColdFusion Server Administration.

ODBC: Microsoft Access options (Windows)


The following table describes ColdFusion ODBC options for Microsoft Access data
sources. You set these options when you configure a ColdFusion data source.

Option Description
Data Source Name A name for your data source.
Description Descriptive information about the data source.
Database File Click Browse to select a database file for a file-based ODBC
data source.
System Database Click Browse to select a shared database. The default user is
Admin and the default password is an empty string. A system
database can be used to secure Microsoft Access database
files.
install.book Page 124 Thursday, May 10, 2001 12:59 PM

124 Chapter 6 Managing Data Sources

Option Description
Driver Settings • Page Timeout The number of milliseconds before a
request for a ColdFusion page times out.
• Buffer Size The total number of bytes that ColdFusion
uses to cache application pages. Enter a value to optimize
ColdFusion performance.
Default Login A username and password combination that ColdFusion uses
to access the data source. If your ODBC data source requires a
username or password, enter them here.
To verify your data source, you need to enter login information
here.

Tips for connecting to Microsoft Access (Windows)


Whether you use OLE DB or ODBC connections, the following suggestions can
improve your Access database connectivity:
• In the ColdFusion Administrator:
− Select Server Settings > Settings and set Limit Simultaneous Requests to 5–7
per processor.
− Select Data Sources > ODBC Data Sources and modify the following
ColdFusion settings for each ODBC Access data source:
Buffer Size = 0 (ODBC only)
Page Timeout = 600 (ODBC only)
Clear the Maintain Database Connections check box (located on the CF
Settings page)
• Install the latest ODBC or OLE DB Drivers from Microsoft on your ColdFusion
Server. You can find these drivers at http://www.microsoft.com/data/.
• Cycle the ColdFusion services each night using the \cfusion\bin\cycle.bat file.
• If you receive an Operation must use an updateable query error message when
you attempt to run a ColdFusion template that updates or deletes from an Access
database, see Knowledge Base Article #11928, “Operation must use an
updateable query error when trying to update Access database.”
• If you get an access denied error when writing to Access (or any other file-based
database), try to recycle the ColdFusion services or clear the Maintain Database
Connection option in the Data Source section in the ColdFusion Administrator.

Installing and Configuring ColdFusion Server


install.book Page 125 Thursday, May 10, 2001 12:59 PM

Connecting to Microsoft Access Databases 125

Connecting to Remote Access Data Sources


When you develop your ColdFusion application, your Access data source could be a
local one. In many cases, your application might need to connect to data sources
that are not local. This section addresses some concerns for remote connections.

Note
This discussion also applies to many other file-based databases, such as dBASE,
FoxPro, and Paradox.

Connecting to network data sources from standalone servers


If you have Windows NT machines set up as standalone servers rather than as
members of a domain, accessing a remote data source (on one of the standalone
servers from a standalone ColdFusion machine over a "direct" connection) can be
difficult.
By default in Windows NT, you run ColdFusion under the System Account. However,
if you try to connect to a file-based database over the network using a System
Account, then you get insufficient permission errors. You must run ColdFusion
Application Server under a Domain User Account that has permission to run
ColdFusion and has permission to read and write to the mdb file.
The following steps describe how you can set up ColdFusion to access the remote
data source.

To set up a remote Access data source for a standalone server:


1 Create a Windows NT Domain User Account for ColdFusion. Set a username,
such as cfusion and assign a password, such as bob. Assign the account at least
administrative privileges.
2 Create an account for ColdFusion on the remote standalone machine. Set the
username to cfusion and the password to bob (the username and password
MUST be the same on both participating machines).
3 Assign the account full privileges on the shared directory where the database
resides.
4 Log off the Windows NT machine and log on to the domain as username: cfusion
password: bob.
5 Select Control Panel > Services > Cold Fusion Application Server and stop the
ColdFusion service.
6 Open Windows NT Explorer and select Tools > Map Network Drive.
7 In the Drive box, scroll to the bottom and select (none).
8 In the Path box, select the mapped drive where the database resides. If it does not
appear, enter \\YourMachineName\YourSharedDirectoryName and click OK.
install.book Page 126 Thursday, May 10, 2001 12:59 PM

126 Chapter 6 Managing Data Sources

Note
For an Access database, point to the mdb file. For other file-based databases,
such as dBASE/FoxPro, point to the directory that contains the database files.

9 Select Control Panel > Services > Cold Fusion Application Server > StartUp >
LogOnAs > This Account and specify username: YourDomainName\cfusion and
password: bob. Click OK.
10 Stop and restart the Cold Fusion service so the changes take effect (the Cold
Fusion service now runs under the cfusion account).
11 Open the ColdFusion Administrator.
12 Set up an ODBC data source pointing to the remote database. In the Database
File field of the Create Data Source page, type—do not browse to—the name of
your database in Universal Naming Convention (UNC) format.

Note
The UNC format is: \\servername\sharename\path\filename, where servername
is the name of the server that you will connect to, sharename is the name of a
volume on that server, path is the name of the directory and subdirectories that
contain the file, and filename is the name of the database file; for example,
\\mstillman\cdrive\cfusion\database\cfexamples.mdb.

13 Check if you can connect to the data source with MSQuery (the Microsoft Query
tool that uses ODBC the same way as does Cold Fusion).
With these settings, you can verify that your permissions are sufficient to access the
remote data source.

Installing and Configuring ColdFusion Server


install.book Page 127 Thursday, May 10, 2001 12:59 PM

Connecting to Oracle Databases 127

Connecting to Oracle Databases


You can configure Oracle ColdFusion data sources for Windows NT and UNIX using
ODBC and native drivers.

Note
ColdFusion supports Oracle 7.3.4 and Oracle 8.0.4 and later.

Configuring Oracle 7.3.4/8.0.x options (Windows)


If you install ColdFusion Server Enterprise Edition on a Windows NT server, you can
configure an Oracle data source using a native driver.

Native drivers: Oracle 7.3.4 and 8.0.x options (Windows)


The following table describes ColdFusion native driver options for Oracle 7.3.4 and
8.0.x native driver data sources on Windows NT.

Option Description
Data Source Name A name for your data source.
Description Descriptive information about the data source.
Host String Enter the database alias that you created using the Oracle
Net8 Easy Config utility. To find the database alias for the
database that you want to connect to, you can use the Oracle
Net8 Easy Config utility.

Configuring Oracle 7.3.4/8.0.x options (UNIX)


If you install ColdFusion Server Enterprise Edition on a Solaris server, you can
configure an Oracle data source using a native driver.

Native drivers: Oracle 7.3.4 and 8.0.x options (UNIX)


The following table describes ColdFusion native driver options for Oracle 7.3.4 and
8.0.x native driver data sources on UNIX:

Option Description
Data Source Name A name for your data source.
Description Descriptive information about the data source.
Host String Enter the database alias that you created using the Oracle
Net8 Easy Config utility. To find the database alias for a
database, you can use the Oracle Net8 Easy Config utility.
install.book Page 128 Thursday, May 10, 2001 12:59 PM

128 Chapter 6 Managing Data Sources

ODBC drivers: MERANT Oracle 7.3.4 and Oracle 8.0.x options (UNIX)
The following table describes ColdFusion ODBC driver options for the MERANT
Oracle 7.3.4 and MERANT Oracle 8.0.x ODBC drivers on UNIX:

Option Description
Data Source Name A name for your data source.
Description Descriptive information about the data source.
Connect String The client connection string designating the server and
database that you want to access.

Connecting to Oracle 7.3.4 and 8.0.x databases (UNIX)


Before ColdFusion applications can connect to Oracle 7.3.4 and 8.0.x databases, you
must install the Oracle client software.
You must modify the /opt/coldfusion/bin/start script to include the
ORACLE_HOME environment variable, and add the $ORACLE_HOME/lib directory
to the LD_LIBRARY_PATH. For an example, see “The /opt/coldfusion/bin/start
script” on page 129. You must edit the $CFHOME/bin/start script for all versions.
The environment variable LD_LIBRARY_PATH must point to the directory
containing the libclntsh.so file, which ColdFusion uses.
If the libclntsh.so file was built in the $CFHOME/lib using a script that you
downloaded from http://www.coldfusion.com, the LD_LIBRARY_PATH variable
should contain an entry for $CFHOME/lib before the entry for $ORACLE_HOME/lib,
for example:
LD_LIBRARY_PATH = $CFHOME/lib:$ORACLE_HOME/
lib:other_database_library_paths...
If the libclntsh.so file is in $ORACLE_HOME/lib, then you need just the single entry
for this directory, for example:
LD_LIBRARY_PATH = $ORACLE_HOME/lib:other_database_library_paths...

Note
The readme.ora file in $CFHOME/odbc/src/oracle incorrectly refers to $CFHOME as
$ODBC_HOME.

Verify the following:


• You can connect to the Oracle server from Solaris with sql*plus before you try to
connect from ColdFusion.
• You are running the Oracle listener.
• You have set up a tnsnames.ora file. For Oracle 7.3.4, it is in the /var/opt/oracle
directory.

Installing and Configuring ColdFusion Server


install.book Page 129 Thursday, May 10, 2001 12:59 PM

Connecting to Oracle Databases 129

Example This is an example of a tnsnames.ora file:


scup=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=scup)
(PORT=1521))
(CONNECT_DATA=(SID=WG73)))

The following table describes the code:

Code Description
scup= Setting for the connect string name in the ColdFusion Administrator.
HOST=scup The IP address, as in HOST=205.185.22.33.
PORT=1521 Port that the tcp listener is assigned to. To identify it, look at the /etc/
services file of the UNIX computer where the Oracle server resides.
SID=WG73 Database identifier. See your Oracle administrator. These settings
are configured when you install the database.

When you complete all the steps in this section, you must stop and restart
ColdFusion services to reload the odbc.ini file.

The /opt/coldfusion/bin/start script


#!/bin/sh
# start - setup environment and run ColdFusion servers
# This script should be run as root.# Set during install
CFHOME=/opt/coldfusion
# Sybase Open Client directory
SYBASE=/work/sybclient11.1
# Oracle SQL *Net RDBMS directory
# See CFHOME/odbc/src/oracle for script to build library
ORACLE_HOME=/opt/oracle7
# Set library search path
#
# NOTE: Add your database client library directory to the FRONT of this
list
#
# Example:
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$SYBASE/lib:/usr/dt/lib:/lib:/usr/
openwin/lib:$CFHOME/lib
# This is the list of variables that ColdFusion will see
# Add any special Database environment varaibles here
VAR_LIST="LD_LIBRARY_PATH CFHOME SYBASE ORACLE_HOME INFORMIXDIR
INFORMIXSERVER II_SYSTEM"
#==========================================================
# You should not need to touch anything below this point
#==========================================================
install.book Page 130 Thursday, May 10, 2001 12:59 PM

130 Chapter 6 Managing Data Sources

The environment variables CFHOME and ORACLE_HOME are assumed to point to


the ColdFusion installation directory (usually /opt/coldfusion) and the Oracle Client
Software installation directory (for example, /opt/oracle8).
Use the genclntsh script provided by Oracle in the $ORACLE_HOME/rdbms/lib
directory and follow the Oracle instructions to build the libclntsh.so library in the
$ORACLE_HOME/lib directory.

Oracle troubleshooting
If ColdFusion cannot establish a connection to the Oracle 7.3.4 driver, try the
following workarounds:
• Move the location of the ORACLE_HOME/lib to the end of the
LD_LIBRARY_PATH in the start script.
• Make sure that the listener port number is the same one that you are pointing to
in the tnsnames.ora file.
• Check in the $ORACLE_HOME/lib directory for the libclntsh.so file. If it does not
exist, you must reinstall the Oracle client software.
If the basic information that you entered in the Oracle Net8 Easy Config is correct,
but the connection test fails, then seek assistance from your Oracle 8 database
administrator (DBA). You should first check the basic connection information:
hostname, SID, username, and password. You can do this using the Net8 Easy Config
utility or by directly inspecting the tnsnames.ora file.
In addition, on UNIX, make sure that you defined the Oracle client library and
ORACLE_HOME in the coldfusion/bin/start script.

Connecting to Oracle 8.0.x through ODBC (UNIX)


NoteTo use Oracle 8.0.4 and 8.0.5 x databases with ColdFusion on UNIX, you need to
build the libclntsh.so shared object file. For Oracle 8.0.6 through 8.1.x, no build is
necessary because the Oracle installation process places the libclntsh.so file in
$ORACLE_HOME/lib.
ColdFusion supports Oracle 8.0.4 and later.

To build a version of libclntsh.so for Oracle 8.0.4 and 8.0.5:


1 From the shell, set ORACLE_HOME, CFHOME, and LD_LIBRARY_PATH as set in
the start script:
• Set ORACLE_HOME to the location of the Oracle client libraries.
• Set CFHOME to the location of your ColdFusion application server.
• Set LD_LIBRARY_PATH the same as in your start script.
For example:
CFHOME=/opt/coldfusion;export CFHOME
ORACLE_HOME=/opt/oracle8;export ORACLE_HOME

Installing and Configuring ColdFusion Server


install.book Page 131 Thursday, May 10, 2001 12:59 PM

Connecting to Oracle Databases 131

LD_LIBRARY_PATH=/lib:/usr/dt/lib:/usr/openwin/lib:$CFHOME/
lib:$ORACLE_HOME/lib;export LD_LIBRARY_PATH
2 From $CFHOME/odbc/src/oracle run the script./genclntsh8.
The script generates a new libclntsh.so in CFHOME; move it to $CFHome/lib.

Note
Oracle 8 users have the original libclntsh.so library in the $ORACLE_HOME/lib
directory. Therefore when creating the LD_LIBRAY_PATH in the $CFHOME/bin/
start script, the $CFHOME/lib directory, containing the correct library, must be
on the LD_LIBRARY_PATH before $ORACLE_HOME/lib. Otherwise, the original
Oracle version loads, resulting in an error.

Troubleshooting the Oracle 7.3.4 native driver (Windows)


When using the Oracle 7.3.4 native driver on Win32 systems, you might get the
following error:
Error Diagnostic Information
Oracle Error Code = 0
Internal error: The data access manager failed to initialize
the Oracle environment.
The error occurred while processing an element with a general identifier
of (cfquery), occupying document position (3:1) to (3:50).
This problem might occur with the Oracle 7.3.4 native driver in several situations:
• There is a duplicate copy of the OCIW32.DLL file (most common cause).
• You cannot verify the connection.
• You are running a cfquery.

To diagnose and fix the problem:


1 Make sure that SQL*Net 7.3.4.0 or later is installed on your server.
2 Make sure that your winnt\system32 directory contains the file ociw32.dll.
• If you have a copy in winnt\system32, rename it, then stop and start the
ColdFusion services.
• If you do not have a copy in winnt\system32, search your hard drive for the
file. If you find a copy anywhere other than orant\bin or cfusion\bin, rename
the file, then restart ColdFusion services.

Configuring the Oracle 8 Client (Windows, UNIX)


This section includes the typical configuration steps that you need to use the Oracle
8 native database driver on UNIX or Windows NT. The following procedures were
written using version 8.0.4.0.0 of the Oracle 8 Client.
install.book Page 132 Thursday, May 10, 2001 12:59 PM

132 Chapter 6 Managing Data Sources

Before you get started, make sure you have the following information handy:
• The name of the host system where the Oracle database resides
• The System Identifier (SID) for your Oracle 8 database
• A login ID and password for connecting to the Oracle 8 database

To use the ColdFusion native driver for Oracle 8:


1 Install the required client software.
2 Use the SQL Net Easy Configuration utility to create a database alias.
You can find the UNIX version of this utility in $ORACLE_HOME/bin/net8wiz.sh.
3 Create the data source in the ColdFusion Administrator, Native Drivers page.
4 Edit the coldfusion/bin/start script to include the following values:
• The database variable ORACLE_HOME
• The library path set in LD_LIBRARY_PATH

To install the Oracle 8 Client:


1 Install the Oracle 8 Client software.
2 Select the Database Administrator or Application User option. This example uses
Application User.
3 Step through options involving stopping Oracle services that are running on your
system, and choose whether to install online documentation.

Running the Oracle Net8 Easy Config utility


The following procedure creates a database alias that you use to reference the Oracle
database when creating the data source in the ColdFusion Administrator. When you
create the database alias, the process writes all of the database connection
information to a configuration file called tnsnames.ora.

To run the Oracle Net8 Easy Config utility:


1 Open the Oracle Net8 Easy Config utility.
On servers running Windows NT, the icon is found in your Oracle for Windows
NT program group. On UNIX, this utility is found in $ORACLE_HOME/bin/
net8wiz.sh.

Installing and Configuring ColdFusion Server


install.book Page 133 Thursday, May 10, 2001 12:59 PM

Connecting to Oracle Databases 133

2 Enter a New Service Name and click Next.

3 In the dialog box, select TCP/IP as the networking protocol to connect with.
Select the Oracle 8 database that you want to use in your ColdFusion application.
4 In the dialog box, enter the host name of the server where the Oracle 8 database
resides. The following figure shows the default for the port number:

5 After entering a host name, enter the Database SID, which identifies your specific
Oracle database instance.
The default is ORCL, but your database SID may be different. For this
information, see your DBA.
6 In the next dialog box, test the database service that you created.
To test the connection to the Oracle database, enter a username and password to
access the database. If you do not have this information, see your DBA.
install.book Page 134 Thursday, May 10, 2001 12:59 PM

134 Chapter 6 Managing Data Sources

Creating the data source in ColdFusion


Now you need to create the data source in ColdFusion.

To create the data source:


1 Open the ColdFusion Administrator to the Data Sources, Native Drivers page.
2 Enter a data source name and select the Oracle 8 native driver from the
drop-down list.
3 When you click Add, ColdFusion opens the configuration page for the data
source. Here you enter information that tells ColdFusion where to find the
database. The following options are the most important ones for a successful
connection:
• Host string Enter the exact database alias that you created using the Oracle
Net8 Easy Config utility.
• ColdFusion Login username and password These options display when
you click the CF Settings button. The username and password are the same as
those used in the Oracle Net8 Easy Config connection test. If you do not know
what the username and password should be, see your Oracle 8 DBA.
You might want to avoid setting a username and password here for security
reasons. If you do not set a name and password, each CFML database call
must specifically define a username and password.
4 After you create the data source, open the Verify Data Source page in the
Administrator to verify that ColdFusion can connect to the Oracle 8 database.

Installing and Configuring ColdFusion Server


install.book Page 135 Thursday, May 10, 2001 12:59 PM

Appendix

Preparing Your Server for


ClusterCATS

This appendix introduces ClusterCATS, the software-based load-balancing features


included with ColdFusion Server 5 Enterprise Edition. Read the following sections to
learn more about preparing your server for clustering and post-installation tasks.

Contents
• Before You Install ColdFusion Server .................................................................... 136
• After You Install ColdFusion Server ....................................................................... 146
install.book Page 136 Thursday, May 10, 2001 12:59 PM

136 Appendix Preparing Your Server for ClusterCATS

Before You Install ColdFusion Server


Before installing ColdFusion Server 5 and ClusterCATS, you should perform the
following pre-installation tasks:
• Configuring DNS servers
• Configuring Web server IP address fail-over
• Using ClusterCATS dynamic IP addressing
• Enabling the STREAMS protocol (Windows NT only)
• Configuring firewalls
• Analyzing Web server content
• Considering domain controllers (Windows NT only)

Configuring DNS servers


ClusterCATS software requires that you register the forward lookup (host
name-to-address translation) and reverse lookup (address-to-host name translation)
entries with your DNS server. For evaluation purposes, you can use host files, but the
ColdFusion team does not recommend this approach in a production environment.

Note
ClusterCATS does not support Dynamic Host Configuration Protocol (DHCP). You
must assign a unique IP address to each Web server.

Understanding DNS servers


When you enter a URL into a Web browser, the browser can locate the Web site that
you want to visit because of the name-to-IP address translation that the Internet
Domain Name System (DNS) performs. The two types of DNS servers involved in the
name-to-IP mapping translation are primary DNS servers and local DNS servers.
This section describes these two types of DNS servers.

Primary DNS servers


The primary DNS server provides the final mapping of your Web site name to the
computer where your Web site resides. The primary DNS server can be located
anywhere on the Internet, but most reside in the same physical location as the Web
servers or at the ISP that provides the connection between your Web servers and the
Internet.
The primary DNS server contains tables of forward and reverse name translations.
For example, forward translation entries (A records) look like this:

URL IP Address
www1.company.com 192.168.0.1
www2.company.com 192.168.0.2
install.book Page 137 Thursday, May 10, 2001 12:59 PM

Before You Install ColdFusion Server 137

Reverse translation entries (PTR records) are just the opposite and look like this:

IP Address URL
192.168.0.1 www1.company.com
192.168.0.2 www2.company.com

It is important that you configure your Web sites to have forward and reverse DNS
entries on your primary DNS server. If you are not responsible for maintaining your
primary DNS server, tell your DNS administrator to add both forward and reverse
entries for your explicit Web server names (www1.company.com,
www2.company.com, and so on).

Note
If both forward and reverse translations are not configured for each explicit Web
server, ClusterCATS will not operate correctly.

Local DNS servers


A local DNS server usually resides at the Web hosting facility. The local DNS server
stores its own local table of name translations for the Web sites that the browser has
visited. If a user enters a URL of a site in a browser that the browser has already
visited, it retrieves the host name-to-IP address translation from the local DNS
server’s table. However, if a user enters a URL for a site that the browser on that
computer has never visited, the local DNS server must access the primary DNS
server on the Internet to resolve the name-to-IP mapping before the browser can
send a request to the appropriate Web server.

Resolving address mappings:


1 A user enters a Web site URL in the browser.
2 The browser checks the local DNS server for the name-to-IP address mapping.
The local DNS server typically resides at the facility where the Web servers are
hosted.
3 If the local DNS server does not have the mapping, it goes out to the Internet and
locates the primary DNS server to look up the name-to-IP address mapping.
If round-robin DNS is being used, the primary DNS server determines which
server in the cluster is next in line to receive the request.
4 The primary DNS server sends back the translation to the local DNS server, which
in turn sends it to the user’s browser.
5 The browser can send an HTTP request to the correct Web server hosting the site.
install.book Page 138 Thursday, May 10, 2001 12:59 PM

138 Appendix Preparing Your Server for ClusterCATS

Configuring the primary DNS server


You must configure DNS so that the forward and reverse lookup translation entries
are entered and registered correctly with your primary DNS server. To accomplish
this, you must define required DNS records (A records and PTR records) for your
Web servers on your primary DNS server.
Besides standard name translations, your primary DNS server can also distribute
HTTP requests sequentially across clustered servers using a technique called
round-robin DNS. This service allows DNS to return a list of multiple servers back to
the browser that requests a name translation.
Round-robin DNS and ClusterCATS work well together. You do not want to rely on
just round-robin DNS for distributing load for your business-critical sites because
DNS functionality is limited. In short, DNS is a good load distribution technique, but
it cannot manage load because it is unable to react to increases in server traffic. It
also cannot detect server failures nor redirect requests among available servers.
ClusterCATS compensates for these limitations.
The ColdFusion team recommends that you use round-robin DNS or a hardware
load-balancing device to distribute requests initially to the Web servers in your
cluster. Following the initial distribution, the ClusterCATS load management and
failover features automatically take over and ensure that your Web applications
remain up and running.

Using ClusterCATS with round-robin DNS


For high volume sites, you should use round-robin DNS to distribute requests to the
Web servers in your cluster initially. The load-management component of
ClusterCATS enhances round-robin DNS by eliminating its two major limitations:
• Server Failure Round robin DNS cannot detect server failure. If a server in a
SmartCluster fails, another server on that subnet assumes the IP address of the
failed server.
• Server Overload Round-robin DNS cannot detect server overloads.
ClusterCATS allows you to configure load thresholds for each server. If the actual
server load exceeds the load threshold, ClusterCATS transparently redirects the
user to another Web server using an HTTP redirect. Once redirected, user
requests and responses flow to and from that server directly, minimizing
response time throughout the user session.
You must ensure that round-robin DNS entries are configured correctly on your
primary DNS server so that ClusterCATS operates effectively with round-robin DNS.
For example, for a single-location cluster of servers consisting of four servers, you
must configure round-robin DNS across all four servers for the domain name and
individual IP addresses for each explicit server name.
The following tables show an example of forward and reverse entries in the DNS.

Host Name IP Address


www.company.com 193.168.0.1
www.company.com 193.168.0.2
install.book Page 139 Thursday, May 10, 2001 12:59 PM

Before You Install ColdFusion Server 139

Host Name IP Address


www.company.com 193.168.0.3
www.company.com 193.168.0.4
www1.company.com 193.168.0.1
www2.company.com 193.168.0.2
www3.company.com 193.168.0.3
www4.company.com 193.168.0.4

IP Address Host Name


193.168.0.1 www1.company.com
193.168.0.2 www2.company.com
193.168.0.3 www3.company.com
193.168.0.4 www4.company.com

Round-robin DNS distributes the initial domain-level requests across all four
servers. Thereafter, ClusterCATS distributes load to avoid failed or overloaded
servers.

Note
When using round-robin DNS, do not define a reverse mapping (PTR record) for the
site name (www.company.com); the cluster does not operate properly if you do.
Only define forward mappings (A records) for www.company.com. However, define
both A records and PTR records for all of the explicit servers (www1, www2,...) in the
cluster. This configuration ensures that requests cycle through the servers
sequentially in round-robin fashion.

Configuring Web server IP address fail-over


ClusterCATS protects clusters from server hardware and software failures. When a
server stops sending or receiving packets from the network, another member
assumes its IP address (and therefore, its HTTP requests), and picks up all HTTP
traffic originally addressed to the failed server. Server failover services are provided
on a per subnet basis.
You can select the Webserver (IP address) fail-over option during the installation
process. If you do not select it during installation, you must reinstall ClusterCATS
and select that option. Preparing your site for ClusterCATS server failover can
require uninstalling your Web server software. For more information on using server
failover in Windows systems, see Advanced ColdFusion Administration.
install.book Page 140 Thursday, May 10, 2001 12:59 PM

140 Appendix Preparing Your Server for ClusterCATS

Using ClusterCATS dynamic IP addressing


The ClusterCATS software can be configured to dynamically enable the IP
address(es), associated with a Web site(s), while it is running. While the ClusterCATS
software is stopped on the local system, the IP address will not be enabled on that
system but might migrate to another server participating in the same cluster where
IP address fail-over support has been installed.
This addressing scheme also involves a static maintenance address for each server
that allows you and ClusterCATS to contact that server at any time, even during a
Web server failure.
The setup for ClusterCATS dynamic IP addressing varies depending on your cluster’s
operating system:
• Windows On Windows systems, if your IP address for the local system is the
same as the IP of your Web server, setting up your site for ClusterCATS dynamic
IP addressing can involve reinstalling your Web server software and resetting
your TCP/IP settings. You must carefully consider your system configuration
before installing ClusterCATS. For more information, see Advanced ColdFusion
Administration.
• UNIX You do not need to configure a UNIX system for dynamic IP addressing
because it is set up by default if you select it during installation.

Enabling the STREAMS protocol (Windows NT only)


The ClusterCATS IP address fail-over subsystem requires that the Streams
Environment be installed so that Address Resolution Protocol (ARP) messages can be
transmitted.

Note
You must add the STREAMS Environment to the network protocols in Windows NT
4.0 systems before installing ClusterCATS for ColdFusion. The ClusterCATS
installation procedure automatically configures STREAMS for Windows 2000
systems.

To add the STREAMS Environment to Windows NT:


1 Select Start > Settings > Control Panel.
2 Open the Network icon.
install.book Page 141 Thursday, May 10, 2001 12:59 PM

Before You Install ColdFusion Server 141

3 Click the Protocols tab.

4 Click Add.
The Select Network Protocol dialog box displays.

5 Select STREAMS Environment from the list of available network protocols and
click OK.
6 Close the Network dialog box. Windows NT prompts you to restart your
computer. Click No. (You restart your system at the end of this procedure.)
7 Open the Devices icon in the Control Panel.
8 Select STREAMS Environment from the list of devices and click Startup. Select
System for the Startup Type and click OK.
9 Restart your system for the changes to take effect.
install.book Page 142 Thursday, May 10, 2001 12:59 PM

142 Appendix Preparing Your Server for ClusterCATS

Configuring firewalls
Many corporate environments today rely on firewalls to securely control access to
proprietary knowledge that resides on public Internet sites, intranet sites, or private
extranet sites. You can configure ClusterCATS to work across one or more firewalls.
A common technique is to use Network Address Translation (NAT) as a security
precaution on your firewall. This configuration segregates internal and external
resources and facilitates extra control and monitoring of Web traffic.

Using ClusterCATS with NAT:


1 Before creating a cluster, you must configure the source of internal and external
name resolution. To reset a server with improper name resolution, select Start >
Programs > ColdFusion Server 5 > ClusterCATS Server Administrator >
Advanced > Reset. Reset each server twice.
2 Make certain that the addresses you are translating, which should correspond to
the outside DNS but not the round-robin entries, contain forward and reverse
DNS entries corresponding to FQHN. Modify the DNS accordingly.
3 Make certain that the internal addresses, those addresses already translated by
the firewall and corresponding to the internal servers, contain forward and
reverse DNS entries corresponding to FQHN. Modify the DNS accordingly.

Note
If no internal DNS server is available, you can use the hosts files as the source of
name resolution.

4 Ensure that internal names match external names. The difference between the
external FQHN and the internal FQHN should be the IP addresses. For example,
examine DNS entries for the following clusters of two servers:
External

Forward Reverse
Server 1 FQHN www1.company.com 205.205.205.10
205.205.205.10 www1.company.com
Server 2 FQHN www2.company.com 205.205.205.20
205.205.205.20 www2.company.com
Server 1 Round-Robin www.company.com
205.205.205.10
Server 2 Round-Robin www.company.com
205.205.205.20
install.book Page 143 Thursday, May 10, 2001 12:59 PM

Before You Install ColdFusion Server 143

Internal

Forward Reverse
Server 1 FQHN www1.company.com 192.168.0.10
192.168.0.10 www1.company.com
Server 2 FQHN www2.company.com 192.168.0.20
192.168.0.20 www2.company.com

Note
Do not set up any internal round-robin entries. Also, static IP addresses are
recommended in lieu of dynamic IP address when clustering behind any
load-balancing or translating hardware.

5 You should test name resolution using the following diagnostic tools:

Tool Description Usage


hostinfo Verifies DNS name c:>cfusion\brighttiger\program> hostinfo IP address
resolution c:>cfusion\brighttiger\program> hostinfo hostname
btcfgchk Verifies the c:>cfusion\brighttiger\program> btcfgchk IP address
configuration c:>cfusion\brighttiger\program> btcfgchk hostname
ping Checks IP addresses c:>ping destination IP address
and host names c:>ping hostname
nslookup Verifies DNS entries c:>nslookup IP address
c:>nslookup hostname
ipconfig Verifies the status of c:>ipconfig/all
the IP stack on all
servers

6 Create the cluster using the Cluster Creation Wizard. Enter the FQHN for each
server in the cluster, its maintenance address, and so on.
7 Enter the external round-robin names in the Web site alias field in the
ClusterCATS Explorer. Select Start > Programs > ColdFusion Server 5 >
ClusterCATS Explorer. Right-click on the cluster > Configure > Administration >
Load Balance > Website Alias.
8 Test fail-over by restarting either server and trying to hit either server with a Web
browser. Hit the round-robin name and test its ability to serve.

Note
If you are using static IP addresses with ClusterCATS fail-over, the failing server
encounters an IP conflict upon recovery and restarts to reclaim its IP address.
install.book Page 144 Thursday, May 10, 2001 12:59 PM

144 Appendix Preparing Your Server for ClusterCATS

If you manage your cluster from behind another firewall, you must open both ports
so that the ClusterCATS Explorer can communicate with the cluster.
The following diagram illustrates this scenario:

As you can see, this scenario involves Company ABC, which has an East Coast and a
West Coast group of servers connected to the Internet and protected by several
firewalls. The ClusterCATS Explorer resides at the corporate headquarters behind a
firewall with a direct connection to the Internet.
You must open and configure the appropriate communication ports on your
firewalls to allow server to server communication in a distributed setting and server
to client communication.

Note
You must open both ports on all affected firewalls.

These ports include the following:


• Port 9123 (for TCP and UDP access)
Opening port 9123 on your firewall allows multiple, distributed cluster of servers
residing in different locations to communicate with one another across firewalls.
• Port 9129 (for TCP and UDP access)
Opening port 9129 on a firewall allows the ClusterCATS Explorer to communicate
with multiple, distributed clusters of servers across firewalls.
install.book Page 145 Thursday, May 10, 2001 12:59 PM

Before You Install ColdFusion Server 145

Analyzing Web server content


All Web servers, virtual server, or Web sites in the same cluster must have identical
content.
The default document specified for each Web server in the cluster should be the
same on all cluster members; for example, set the default document to default.jsp.

Considering domain controllers (Windows NT only)


If you are using Windows NT Domain server authentication, then each Web server in
a cluster must participate as a member NT server in a domain. Do not make any
server in your cluster the primary domain controller (PDC).
install.book Page 146 Thursday, May 10, 2001 12:59 PM

146 Appendix Preparing Your Server for ClusterCATS

After You Install ColdFusion Server


After you successfully install ColdFusion Server 5 on all members of the cluster and
any administrative systems, you are ready to create your first cluster.
If you are administering ClusterCATS from a Windows NT system, then you can use
the Cluster Setup Wizard or manually create the cluster. For more information, see
Advanced ColdFusion Administration
If you are administering ClusterCATS from a Solaris or Linux system, see Advanced
ColdFusion Administration.
Regardless of the method that you use to create your first cluster, you should
familiarize yourself with the procedures in the following table when implementing
your Web applications in a clustered environment.

Option Description
Load thresholds for servers Two response time thresholds configured for each
server. One threshold defines maximum or busy load;
the second activates load management. If the load for
the server exceeds the busy threshold, no new sessions
can start on that server. If another server in the cluster
has the capacity to handle additional users, requests are
redirected to that server. The load-management
activation threshold is referred to as the gradual
redirection threshold and is designed to prevent the
server from ever reaching the peak threshold.
For more information on load thresholds, see Advanced
ColdFusion Administration.
Email addresses for alarm ClusterCATS generates alarm notifications for several
recipients events including HTTP server failures, server busy, and
Web server failover. You provide e-mail addresses of all
administrators you want ClusterCATS to notify for each
generated alarm notification.
For more information on ClusterCATS alarms, see
Advanced ColdFusion Administration.
Session-aware load If your Web applications use session variables that store
balancing information in Web server memory, you should enable
session-aware load-balancing. This feature prevents
users who have established a session from being
redirected to another server as a result of
load-balancing.
For more information on enabling session-aware load
balancing, see Advanced ColdFusion Administration.
install.book Page 147 Thursday, May 10, 2001 12:59 PM

After You Install ColdFusion Server 147

Option Description
Administering with the If you are using a UNIX system to administer your cluster
ClusterCATS Web with the ClusterCATS Web Explorer, you must configure
Explorer your Web server to host the Web Explorer pages.
For more information, see Advanced ColdFusion
Administration.
Administrative Password protect administrative access to your cluster
authentication members using domain accounts (Windows NT only) or
local accounts on each system (UNIX and Windows NT).
Administrative users must also be members of the group
sys, or a special BT_<clustername> group.
For more information, see Advanced ColdFusion
Administration.
install.book Page 148 Thursday, May 10, 2001 12:59 PM

148 Appendix Preparing Your Server for ClusterCATS

S-ar putea să vă placă și