Administering ColdFusion Server ColdFusion 4.
Copyright Notice © 1999 Allaire Corporation. 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 Allaire Corporation.
Contents Preface: Welcome to ColdFusion ...................................................................xi Intended Audience......................................................................................................................... xii Welcome to the ColdFusion 4.5 Web Application Server ........................................................... xii Products and System Requirements ............................................................................................
iv Administering ColdFusion Server Uninstalling ColdFusion.........................................................................................................16 Configuring Web servers for Solaris.......................................................................................16 Using scripts to start and stop ColdFusion manually ..........................................................22 Installing ColdFusion on Linux ...........................................................................
Contents ColdFusion Java Settings................................................................................................................54 ColdFusion Version Information...................................................................................................55 Solaris version information ....................................................................................................55 The ColdFusion Logging Page ........................................................................
vi Administering ColdFusion Server Configuring Microsoft SQL Server Options (UNIX) .............................................................88 Connecting to Visual FoxPro Databases .......................................................................................89 Configuring Visual FoxPro Options (Windows)....................................................................89 Connecting to OpenIngress Databases......................................................................................
Contents Defining the Scheduler Refresh Interval .....................................................................................126 Logging Scheduled Events ...........................................................................................................127 Chapter 6: Creating Scalable and Highly Available Web Sites .................129 What is Scalability? .......................................................................................................................
viii Administering ColdFusion Server Restricting a server from participating in a cluster ............................................................224 Putting a cluster member in maintenance mode...............................................................225 Updating software or content on an existing cluster .........................................................228 Resetting a server’s configuration to its pre-clustered state..............................................
Contents Advanced Security Basics.............................................................................................................290 User Directories.....................................................................................................................291 Resources ...............................................................................................................................291 Policies ..............................................................................
x Administering ColdFusion Server
Preface Welcome to ColdFusion Administering ColdFusion Server is intended for anyone who needs to install, configure, and maintain ColdFusion Server. Contents • Intended Audience........................................................................................... xii • Welcome to the ColdFusion 4.5 Web Application Server.............................. xii • Products and System Requirements............................................................... xii • New features in ColdFusion 4.5 ....
xii Administering ColdFusion Server Intended Audience Administering ColdFusion Server is meant for anyone who needs to install, configure, and maintain one or more ColdFusion Server installations. Welcome to the ColdFusion 4.5 Web Application Server The ColdFusion 4.5 release focuses on fundamentals — the fundamentals of delivering your e-business: faster development, better reliability, enhanced scalability, expanded integration, and stronger security. At the center of the ColdFusion 4.
Preface xiii ColdFusion Server 4.5 Enterprise Edition for Solaris • SPARC Solaris 2.5.1, 2.6, or 7 (patch 103582-1B or higher) • 128 MB RAM (256 MB recommended for clustering) • 200 MB hard disk space ColdFusion Server 4.5 Enterprise Edition for Linux • Red Hat Linux 6.0 or 6.1 • Intel Pentium or above • 128 MB RAM (256 MB recommended for clustering) • 150 MB hard disk space ColdFusion Server 4.5 Professional Edition for Windows • Windows 95/98 or Windows NT 4.
xiv Administering ColdFusion Server New features in ColdFusion 4.5 A wide range of new features are available in ColdFusion 4.5. New visual tools Universal File Browser — Access all your files from a single explorer that integrates access to the Windows file system, ColdFusion RDS servers, and FTP servers. Dragand-drop between any of these services all in an integrated file browser.
Preface xv Better reliability Server Probes — Guarantee high availability by automatically detecting when a ColdFusion Server or Web server hangs or stops, failing-over to a new machine in a ColdFusion cluster, and restarting the server with problems. (Enterprise Edition only) Improved Automatic Server Recovery — Monitor and automatically restart server process in case of failures or critical errors on individual servers not deployed in a cluster.
xvi Administering ColdFusion Server Enterprise connectivity features Transaction Commit and Rollback — Control database transactions with programmable commit and rollback support for more reliable and better-managed database interactions. Java Object and EJB Connectivity — Connect to any Java object or Enterprise JavaBean (EJB) hosted by any major EJB server to extend ColdFusion and access complex business logic or third party distributed components.
Preface xvii New Advanced Security Interface — Manage Advanced Security configuration more quickly and easily with a completely redesigned browser-based resource view. Scriptable Advanced Security Administration — Configure ColdFusion Advanced Security through your own CFML scripts for easier maintenance of ColdFusion Servers. Developer Resources Allaire Corporation is committed to setting the standard for customer support in developer education, technical support, and professional services.
xviii Administering ColdFusion Server About ColdFusion Documentation ColdFusion documentation is designed to provide support for all components of the ColdFusion development system. Both the print and online versions are organized to allow you to quickly locate the information you need. In addition to the book set, the documentation is provided in two other formats: • HTML — Browser-based Help references.
Preface xix Using ColdFusion Studio Documents everything you need to know about using ColdFusion Studio, including features like projects, source control integration, as well as the Studio workspace and interface. Quick Reference to CFML A valuable quick reference to CFML tags, functions, and variables. ColdFusion Server online documentation To view the HTML documentation, open the following URL: http://127.0.0.1/ cfdocs/dochome.htm.
xx Administering ColdFusion Server Documentation conventions When reading, please be aware of these formatting cues: • Code samples, filenames, and URLs are set in a monospaced font • Notes and tips are identified by bold type • Bulleted lists present options and features • Numbered steps indicate procedures • Tool button icons are generally shown with procedure steps • Menu levels are separated by the greater than (>) sign • Text for you to type in is set in italics Getting Answers One of the best ways
Preface xxi Postings to the ColdFusion Support Forum (http://forums.allaire.com) can be made any time. Sales Toll Free: 888.939.2545 Tel: 617.761.2100 Fax: 617.761.2101 Email: sales@allaire.com Web: http://www.allaire.
xxii Administering ColdFusion Server
CHAPTER 1 Chapter 1 Installing and Configuring ColdFusion This chapter describes ColdFusion’s system requirements and how to install and configure ColdFusion on your platform. Contents • ColdFusion System Requirements.................................................................... 2 • Installing ColdFusion on Windows................................................................... 5 • Installing ColdFusion on Solaris .....................................................................
2 Administering ColdFusion Server ColdFusion System Requirements ColdFusion v4.5 runs on the following platforms: • “Windows (NT, 98, or 95)” on page 2 • “Solaris (Enterprise edition only)” on page 4 • “Linux” on page 5 This section describes system requirements for each platform. Windows (NT, 98, or 95) The minimum requirements needed to install and run ColdFusion Server on Windows depend on which edition you install, Enterprise, Professional, or Express.
Chapter 1: Installing and Configuring ColdFusion 3 ColdFusion Server 4.5 Professional Edition for Windows To install and use ColdFusion Server 4.5 Professional edition on Windows, your system must meet the following minimum requirements: • Windows 95/98 or Windows NT Server v 4.0 with Service Pack 4 • Intel Pentium or higher • 32 MB of RAM (128 recommended) • 50 MB of free disk space • A World Wide Web server that supports the NSAPI, ISAPI, or WSAPI application programming interfaces (APIs).
4 Administering ColdFusion Server ColdFusion Server 4.5 Express Edition for Windows To install and use ColdFusion Server 4.5 Express edition on Windows, your system must meet the following minimum requirements: • Windows 95/98 or Windows NT Server v 4.0 with Service Pack 4 • Intel Pentium or higher • 32 MB of RAM (64 recommended) • 25 MB of free disk space • A World Wide Web server that supports the NSAPI, ISAPI, or WSAPI application programming interfaces (APIs).
Chapter 1: Installing and Configuring ColdFusion 5 Linux To install and use ColdFusion Server 4.5 Express, Professional, or Enterprise edition on Linux, your system must meet the following minimum requirements: • RedHat operating system v6.0 or 6.1 (with glibc v2.1, gcc/egcs libstdc++ v2.9, and v2.
6 Administering ColdFusion Server • You can also check the Services icon in the Windows Control Panel or open your Web server administration utility to determine if your Web server is started or stopped. Installing ColdFusion The installation procedure assumes you are installing from a CD. If you purchased and downloaded ColdFusion from the Allaire Online Store, follow the download instructions found there. Then follow the install procedure below, skipping step 2.
Chapter 1: Installing and Configuring ColdFusion 6. Click Next in the Welcome and Software License Agreement dialog boxes. The User Information dialog box appears after the Software License Agreement dialog box. 7. Enter your name, company, and ColdFusion serial number in the User Information dialog box and click Next. Note You’ll find your ColdFusion serial number on the product box. The Choose Destination Directory dialog box appears next.
8 Administering ColdFusion Server 8. Accept or change the default destination folder and click Next. The Select Web Server dialog box appears. If your Web server is already installed, the ColdFusion Setup program will automatically detect it. 9. If your Web server is not one of the ones listed, select the Other option and click Next. Otherwise, just click Next. The Select Web Server Document Directory dialog box appears next.
Chapter 1: Installing and Configuring ColdFusion 10. Either accept the Web server’s default document directory or enter a different location for the default directory and click Next. Note ColdFusion documentation and example code are installed in a subdirectory below the Web server’s document directory. The Select Install Options dialog box appears. 11. Accept the default install options or select those that you want and click Next.
10 Administering ColdFusion Server see “Installing ClusterCATS” on page 185. To install Advanced Security, see “Installing Advanced Security” on page 298. The Select Administrator Password dialog box appears next. 12. Enter a password you will use to access the ColdFusion Administrator in the Password and Confirm fields and press Next. The Select ColdFusion Studio Password dialog box appears. 13.
Chapter 1: Installing and Configuring ColdFusion 11 14. Click Next or OK in the remaining dialog boxes to begin copying the ColdFusion files to the server. If your system has a previous version of ColdFusion, the setup wizard replaces ColdFusion program files but does not remove or change any existing application pages (template files) that may be present. ColdFusion updates the Windows registry and the ColdFusion services start. If you chose to install the ODBC Desktop Drivers, a warning screen appears.
12 Administering ColdFusion Server • “Configuring the Apache Web server for ColdFusion” on page 12 • “Changing the ColdFusion user account” on page 12 Configuring the Apache Web server for ColdFusion To configure the Apache Web Server v1.3.6 for use with ColdFusion, you need to: • Get a copy of the Apache Web server from the Apache HTTP Server Project Web site at http://www.apache.org/. • Read the Apache documentation on support for Win32 platforms: http:// www.apache.org/docs/windows.html.
Chapter 1: Installing and Configuring ColdFusion 2. 13 Select the ColdFusion Application Server service and click Startup. The Service Properties dialog box appears. Use this dialog to set startup options for the ColdFusion Application Server service. 3. In the Log On As section, click the This Account radio button and enter the appropriate account information. Installing ColdFusion on Solaris ColdFusion is distributed as a Solaris package.
14 Administering ColdFusion Server • “Installing ColdFusion” on page 14 • “Upgrading from a previous release of ColdFuison” on page 16 • “Uninstalling ColdFusion” on page 16 • “Configuring Web servers for Solaris” on page 16 • “Using scripts to start and stop ColdFusion manually” on page 22 Installing ColdFusion Before installing ColdFusion please note the following considerations: • The installation procedure assumes you are installing from a CD.
Chapter 1: Installing and Configuring ColdFusion Note 15 If you specified a directory other than the default, the installation script will create a symbolic link from /opt/coldfusion to wherever you installed ColdFusion. 8. Enter the name of the Web server you are running and press Enter or just press Enter if you are running the default Web server (Netscape Enterprise Server). 9. Press Enter to have the installation program automatically configure the Web server.
16 Administering ColdFusion Server Upgrading from a previous release of ColdFuison When upgrading from an earlier release of ColdFusion on Solaris, you may need to edit the package installation defaults file before running the pkgadd utility. The package installation defaults file is located in the following location: /var/sadm/install/admin/default This file controls the behavior of the Solaris packaging commands. The value of the instance setting may need to be changed from quit or unique to overwrite.
Chapter 1: Installing and Configuring ColdFusion 17 Choosing the right plug-in version Netscape plug-ins for ColdFusion are installed in the /coldfusion/ webserver/nsapi directory. Use the following table to select the proper plug-in file. ColdFusion Plugins for Netscape Use this Plugin coldfusion2x.so coldfusion3x.so With this Netscape Server Product With this Version of Solaris Netscape Enterprise Server 2.01 2.51 or higher Netscape FastTrack 2.01 2.
18 Administering ColdFusion Server If you run the Netscape Server Manager, Netscape’s browser-based administrator, you may get a warning about edits to the Netscape configuration files. This is normal. Follow the instructions and click on the Apply button to reload the new configuration files. 6. Test the setup by accessing the ColdFusion Administrator by entering the following URL in your browser: http://localhost/CFIDE/administrator/index.
Chapter 1: Installing and Configuring ColdFusion 19 NameTrans fn="document-root" root="/local1/netscape/root-skagway" PathCheck fn="unix-uri-clean" PathCheck fn="check-acl" acl="default" PathCheck fn="find-pathinfo" PathCheck fn="find-index" index-names="index.html,home.
20 Administering ColdFusion Server Configuring the Apache Web Server ColdFusion has been tested with Apache version 1.2.x and 1.3. To obtain Apache free of charge, go to the Apache Web site at http://www.apache.org. You can build the ColdFusion module into your Apache Web server binary. This method is efficient because the server does not have to start a new process for every ColdFusion request. This section describes: • “Adding the ColdFusion module to Apache 1.2.
Chapter 1: Installing and Configuring ColdFusion 21 Adding the ColdFusion module to Apache 1.3.x You can find the ColdFusion module in the installation directory (usually /opt) under the coldfusion/webserver/apache directory. The pre-built module shipped with ColdFusion 4.5 is built with Apache 1.3.6. This module will not work with earlier versions of Apache 1.3.x, and it may not work with later versions if the Apache Group changes the MODULE_MAGIC_NUMBER_MAJOR (src src/include/ap_mmn.
22 Administering ColdFusion Server 4. Run the apxs command to build mod_coldfusion.so by entering the following command: make 5. Run the apxs command to add the module to the Apache configuration by entering the following command: make install 6. Restart your Apache server by entering the following command: apachectl restart To configure the Apache module that Allaire provides: 1. Copy the ColdFusion module to the Apache modules directory: cp /opt/coldfusion/webserver/apache/mod_coldfusion.
Chapter 1: Installing and Configuring ColdFusion 23 ColdFusion runs the following processes on the system: • cfexec — Starts/stops the other processes and manages page scheduling • cfserver — The application server process • cfrdsservice — Provides system support for the Administrator as well as security and debugging services for ColdFusion Studio The following processes also run if you’ve installed the ClusterCATS for ColdFusion option: • ipaliasd — Provides IP failover capability for ColdFusion Server
24 Administering ColdFusion Server To install ColdFusion on Linux: 1. Log in as root. 2. Load the ColdFusion CD-ROM into your CD drive. 3. Mount the CD-ROM on /mnt/cdrom if necessary. 4. Change directories to the cf/linux directory on the CD. 5. Run the ColdFusion installation script by entering the following command: ./cfinstall The ColdFusion installation script starts. 6. Enter your ColdFusion registration ID and press Enter. You can find the registration ID on the product box. 7.
Chapter 1: Installing and Configuring ColdFusion 25 14. Enter the user name under which ColdFusion will run or press Enter to run under the default user name (nobody). Note This user account must be a valid, existing account. 15. If you want to install ClusterCATS at this time, press Enter. Otherwise, enter n and press Enter to continue. If you do not install ClusterCATS now, you can do so later by running the ClusterCATS installation script on its own. See “Installing ClusterCATS” on page 185. 16.
26 Administering ColdFusion Server
CHAPTER 2 Chapter 2 Introduction to ColdFusion Server This chapter provides an overview of ColdFusion Server and describes how to access the ColdFusion Administrator pages. Contents • Overview of Administering ColdFusion ......................................................... 28 • Summary of Administrative Tasks .................................................................. 29 • The ColdFusion Administrator .......................................................................
28 Administering ColdFusion Server Overview of Administering ColdFusion The ColdFusion Administrator is the administrative interface of the ColdFusion Server. ColdFusion Server is the component of the overall ColdFusion Web application development system that processes ColdFusion application pages and returns HTML pages to Web clients.
Chapter 2: Introduction to ColdFusion Server 29 Initial ColdFusion administration tasks Immediately after installing ColdFusion Server, you’ll probably want to perform some of the following configuration tasks: Initial Adminitration Tasks If necessary, configure your Web server for ColdFusion If you are using Netscape or Apache Web servers on Solaris, you’ll need to perform some initial configuration tasks for ColdFusion.
30 Administering ColdFusion Server You can learn more about each of these areas of ColdFusion administration by referring to the information in the following table: Information about ColdFusion Administration Subject Where to find it Installing ColdFusion See Chapter 1, “Installing and Configuring ColdFusion,” on page 1. Configuring ColdFusion data sources Chapter 4, “Managing Data Sources,” on page 77.
Chapter 2: Introduction to ColdFusion Server The following table describes the purpose of each category in the Administrator.
32 Administering ColdFusion Server ColdFusion Services on Windows NT By default, ColdFusion employs four separate services under Windows NT. The following table explains the purpose of each one. ColdFusion Services on Windows NT Service Purpose Bright Tiger Service Manages ColdFusion Server load-balancing and failover. For more information about clustering, which enables loadbalancing and failover in ColdFusion, see Chapter 6, “Creating Scalable and Highly Available Web Sites,” on page 129.
Chapter 2: Introduction to ColdFusion Server 33 ColdFusion Processes on Solaris ColdFusion runs these processes on the system: • cfexec - Starts/stops the other processes and manages page scheduling • cfserver - The application server process • cfrdsservice - Provides system support for the Administrator • ipaliasd - Provides IP failover capability for ColdFusion Server In addition, the windu_registryd40 process provides an emulation of the Windows registry database.
34 Administering ColdFusion Server Windows NT During setup, ColdFusion is installed as a series of system services in Windows NT. Ordinarily, ColdFusion is launched at startup time. To manage how the services are run, use the Services Control Panel in Windows NT. To prevent ColdFusion from running at startup: 1. Open the Services Control Panel. 2. Select the ColdFusion Application Server service. 3.
Chapter 2: Introduction to ColdFusion Server 35 When ColdFusion is running in Windows 95 or 98, two icons appear in the system tray: To halt the ColdFusion service or to access the ColdFusion Administrator, right mouse click the IDE service icon. To run ColdFusion at startup, place a shortcut for the ColdFusion icon in the Startup program group.
36 Administering ColdFusion Server
CHAPTER 3 Chapter 3 Configuring ColdFusion Server This section explains basic ColdFusion administration tasks. Contents • The ColdFusion Administrator ....................................................................... 39 • Starting and Stopping ColdFusion.................................................................. 41 • The Server Settings Page.................................................................................. 42 • Configuring Administrator Security ......................
38 Administering ColdFusion Server • Using ColdFusion in a Distributed Configuration.........................................
Chapter 3: Configuring ColdFusion Server 39 The ColdFusion Administrator You use the Administrator to perform a variety of administrative tasks for the ColdFusion Server, such as adding and configuring a data source, or scheduling application page execution, configuring security settings, and so on. During the ColdFusion installation process, you specify an Administrator password that is used to prevent unauthorized access to the Administrator pages. To open the ColdFusion Administrator: 1.
40 Administering ColdFusion Server Once the Administrator page loads, click one of the Administrator links to work with a specific area of the Administrator.
Chapter 3: Configuring ColdFusion Server 41 ColdFusion Administrator Options (Continued) Category Description Automated tasks The Automated tasks pages provide options for: • Adding new scheduled tasks • Specifying how often ColdFusion checks for new scheduled tasks to execute Miscellaneous • Use the Mail page to specify a default mail server hostname as well as other mail-related configuration options. • The debugging page allows you to enable and configure error message output for ColdFusion pages.
42 Administering ColdFusion Server Batch files, as well as other executables, can be scheduled in Windows NT. Refer to your Windows NT documentation for more information about scheduling, and stopping and starting NT services. Note You must be logged in with Administrator rights to execute these batch commands.
Chapter 3: Configuring ColdFusion Server 43 affect server performance. Use the following table to find out about options on the Server Settings Administrator page. Server Settings Options Option Description Limit simultaneous requests Use this value to limit the number of simultaneous requests for the ColdFusion server. Once ColdFusion reaches this limit, requests are queued up and handled in the order received.
44 Administering ColdFusion Server Caching Settings The Administrator Caching Settings page contains several configuration options you can set or enable to cache templates, queries, and data sources. Caching Options Option Description Template cache size Use this option to specify how much memory you want to reserve for caching ColdFusion pages. For best performance, assuming your server has enough memory, you should set this value to the total number of kilobytes of all your active ColdFusion pages.
Chapter 3: Configuring ColdFusion Server 45 • Chapter 8, “ColdFusion Security,” on page 273 — Explains the differences between Basic and Advanced security so you can determine which features best suit your needs. • Chapter 9, “Configuring Basic Security,” on page 283 — Describes how to configure Basic security options for developing and deploying coldFusion applications.
46 Administering ColdFusion Server Client Variable Storage (Continued) Storage Type Browser cookies Advantages • Simple implementation • Good performance • Can be set to automatically expire • Client-side control Disadvantages • Users can configure browsers to disallow cookies • ColdFusion limits individual cookie data to 4 KB • Netscape Navigator allows only 20 cookies from any one host; ColdFusion uses three cookies to store read-only data, leaving only 17 additional cookies available for use Externa
Chapter 3: Configuring ColdFusion Server 47 To increase maximum registry size: 1. Open the System Control Panel and click the Performance tab. 2. In the Virtual Memory group box, click the Change button to open the Virtual Memory dialog. 3. At the bottom of the dialog, the current registry size is reported. Specify a new maximum registry size in MB. Checking registry size (UNIX) Unlike Windows NT, ColdFusion for UNIX does not impose limits on the size of the registry.
48 Administering ColdFusion Server State Management and Server Clustering When using ClusterCATS for ColdFusion to cluster Web servers, and you want to use client variables, you must use an external repository to store client variables, since the system registry, which is bound to an individual system, can’t be dynamically accessed by any other system.
Chapter 3: Configuring ColdFusion Server 49 supports the SQL required for the client variable repository. In addition, OLE DB data sources are not supported for use as a client data source repository. 4. Click Create to create the new data source. To enable your client variable data source: 1. Open the ColdFusion Administrator to the Variables page, which is in the Server group. 2.
50 Administering ColdFusion Server Create client variable data source tables Use this option to allow ColdFusion to create the tables necessary for client variables when you first configure the data source for this purpose. As you configure other servers in your cluster to use this client variables data source, be sure to disable the option for ColdFusion to create the necessary tables.
Chapter 3: Configuring ColdFusion Server 51 Sample table creation page