The ColdFusion 4.0 Web Application Construction Kit - 3 ...

ballscauliflowerSoftware and s/w Development

Jun 30, 2012 (4 years and 11 months ago)

317 views

The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..
Page
1
of
12
file://J:\prodinfo\MEMBERS\MA\ir045.html
3/23/01
[Figures are not included in this sample chapter]
The ColdFusion 4.0 Web Application
Construction Kit
- 3 -
Installing ColdFusion and ColdFusion Studio
In this chapter
￿
Preparing to Install ColdFusion
￿
Installing ColdFusion
￿
Preparing to Install ColdFusion Studio
￿
Installing ColdFusion Studio
Preparing to Install ColdFusion
Before getting started, you need to know that ColdFusion is extremely easy to install and configure.
As long as the basic hardware and software requirements are in place, installing ColdFusion should
take just a few minutes.
NOTE: ColdFusion comes in two distinct versions, a professional version and an
enterprise version. The enterprise version provides sophisticated scalability and security
features, and additional high-end features. Everything taught in this book applies to both
versions of the product. The evaluation version on this book’s accompanying CD-ROM
is the enterprise version of the ColdFusion Application Server.
Installing ColdFusion involves the following steps:
1. Verify that you have the correct hardware.
2. Select an operating system and ensure that it is configured correctly.
3. Select a Web server and ensure that it is installed and functions correctly.
4. Perform the actual installation.
5. Test the installation.
The first half of this chapter walks you through each of these steps.
Hardware Requirements
The ColdFusion Application Server runs on two different types of hardware: Intel-based hardware
(capable of running 32-bit Windows), Sun SPARC hardware running Solaris, and HP boxes running
HP/UX.
Intel-Based Hardware
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 2 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
ColdFusion runs under Windows 95 and Windows 98, and Windows NT (on Intel hardware only).
The minimum recommended hardware is a Pentium class machine running at 100MHz.
If you’ll be using Windows 95 or Windows 98, you should have no less than 32MB of RAM; 64MB
of RAM is the minimum if you’ll be using Windows NT. Additional memory enhances system
performance, especially if you’re running Windows NT.
Your computer should have 50MB of disk space available after the Web server is installed and
configured. Obviously, as you create applications on the server, the amount of disk space needed will
increase.
The computer also needs to be connected to a network. This is usually via a network interface card
(NIC) installed into the computer on an Ethernet or Token Ring network. A modem can also be used
to connect the computer to a network.
Sun SPARC Hardware
ColdFusion requires a minimum of 64MB of RAM, but 128MB is recommended.
Your computer should have 60MB of disk space available after the Web server is installed and
configured. Again, the amount of disk space needed will increase as you create applications on the
server.
The computer also needs to be connected to a network. Usually this is done via a NIC installed into
the computer on an Ethernet or Token Ring network. A modem can also be used to connect the
computer to a network.
Selecting a Hardware Platform
ColdFusion runs on two very different hardware platforms, each with its own advantages and
disadvantages. Which is right for you? There is no right or wrong answer, but here are some points to
consider when making this decision:
￿
Almost all of your ColdFusion code will run seamlessly on either platform. It is therefore
possible to change your hardware platform at a later date without having to rewrite all of your
code.
￿
Sun SPARC hardware is considerably more expensive than Intel hardware, and you do not
have the selection of vendors and products that you have with Intel-based hardware.
￿
Intel-based hardware runs 32-bit Windows (Windows 95 or 98, or Windows NT), which is
easier to install and manage.
￿
Intel hardware expertise is more readily available than is Sun SPARC hardware expertise.
￿
The hardware you have available, and any existing expertise, are primary factors to consider
when selecting a hardware platform.
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 3 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
￿
Sun SPARC hardware generally performs better than Intel-based hardware, and it is more
scalable.
Evaluation version of both the Windows and Solaris versions of the ColdFusion Application Server
are on the accompanying CD-ROM. If you would like information on other versions, contact Allaire
at 617-761-2000 or at http://www.allaire.com.
Selecting an Operating System
Once you have selected the hardware on which you will run your ColdFusion Application Server, the
next step is to select an operating system. The choices available to you are going to be based on the
hardware platform you select.
Operating Systems for Intel-Based Hardware
You have two operating system choices when running Intel-based hardware: Windows 95 or
Windows 98 (from a ColdFusion perspective these are one and the same), and Windows NT.
Windows 95 and Windows 98 does not come with a built-in Web server, Windows NT (version 4 or
later) does.
Windows 95 and Windows 98 are a great testing and development platform, and could also be used
for very low volume Web sites. Live production Web servers should run on Windows NT, not
Windows 95 or Windows 98. Windows NT was designed to handle greater system loads, and is far
more scalable than Windows 95 or Windows 98.
NOTE: ColdFusion runs under both Windows NT Server and Windows NT
Workstation. The practical differences between using Server and Workstation are the
number of concurrent connections that your Web server (and thus ColdFusion) will be
able to handle. Windows NT Workstation limits the number of connections to 10;
Windows NT Server does not have this limitation.
Your operating system must have the TCP/IP protocol installed in order to run Web services. You
may do this either during operating system installation or after the operating system is installed. To
verify that TCP/IP is installed (and to install it if not), do the following:
￿
Windows 95 and Windows 98 users can right-click the Network Neighborhood icon on the
desktop and select the Properties option to display the Network properties dialog box shown in
Figure 3.1. The TCP/IP protocol should be shown in the Configuration tab. If it is not present,
click the Add button to install it.
FIGURE 3.1 The Windows 95 Control Panel applet shows all installed clients, protocols, and
adapters.
￿
Windows NT users can right-click the Network Neighborhood icon and select Properties
(select Network from the Control Panel if you are using Windows NT 3.5x) to display the
Network properties dialog box, shown in Figure 3.2. If it is not present, click the Add button to
install it.
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 4 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
FIGURE 3.3 The Ping command may be used to check that the TCP/IP protocol is installed and
running.
TCP/IP--as well as DNS and router settings--must be installed and configured properly for your Web
server to function properly. Refer to your operating system documentation for details, or contact your
network administrator or ISP. See Chapter 2, "Introduction to ColdFusion," for more information
about TCP/IP and IP addresses.
To verify that TCP/IP is installed and operating properly, do the following:
1. Open an MS-DOS or Command Prompt window by selecting that option from the Start,
Programs menu.
2. Type PING localhost or PING 127.0.0.1 at the DOS prompt. You should see a series of
replies echoed onto the screen, as shown in Figure 3.3. If the replies are shown, TCP/IP is
installed and working.
FIGURE 3.3 The Ping command may be used to check that the TCP/IP protocol is installed and
running.
NOTE: IP address 127.0.0.1 is a special address that always refers to your own
computer, regardless of what the actual IP address is. localhost is the host name for this
special IP address.
Another good way to test that TCP/IP working is to install a Web browser on the server and try to use
it to access other Web sites and pages. TCP/IP is working properly if you can browse the Web or
access other intranet pages.
NOTE: ColdFusion only supports Windows NT on Intel-based hardware. There is
currently no version of ColdFusion for Windows NT on other hardware, like DEC
Alpha.
Operating Systems for Sun SPARC Hardware I
f you have opted to use Sun SPARC hardware, you will use Sun’s Solaris as your operating system.
ColdFusion requires that you be running Solaris version 2.5.1 or later, and that Solaris Patch 101242-
11 or later be installed.
For more information about Sun’s SPARC hardware and the Solaris operating system, visit the Sun
Internet site at http://www.sun.com.
Selecting a Web Server
Your next task is to select a Web server. As explained in Chapter 2, Web servers are software
programs and you must select a Web server that runs on the hardware platform and operating system
that you selected.
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 5 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
ColdFusion supports several different Web servers, allowing you to choose the server that best suits
your needs. Table 3.1 lists the supported Web servers and the platforms on which they are supported,
as well as the address where you can obtain additional product information.
TABLE 3.1 ColdFusion-Supported Web Servers
Product
URL
Platforms
Apache
http://www.apache.org
Solaris
Microsoft IIS
http://www.microsoft.com/iis
Windows NT, Windows 95
Netscape Enterprise Server
http://www.netscape.com
Windows NT, Solaris
O’Reilly WebSite Pro
http://website.ora.com
Windows NT, Windows 95
Which Web server is right for you? There is no right or wrong answer here, and asking this question
of a group of Webmasters is likely to elicit strong and differing opinions. If you already have a Web
server installed or have experience with any particular product, you are best off starting with that
product.
Here are some points to consider when picking your Web server:
￿
Microsoft IIS (and its Windows 95 counterpart, Microsoft Personal Web Server) are available
from Microsoft at no charge. In fact, IIS comes bundled with Windows NT version 4 or later.
IIS uses the user lists and security options in Windows NT itself, not requiring you to maintain
yet another list of users’ passwords and rights. This also means that IIS users must have a
network login in order to have a Web server login.
￿
Netscape Enterprise Server is the latest addition to a long line of popular commercial Web
servers. Evaluation versions are available from the Netscape Web site. Enterprise Server runs
on both Windows NT and Sun Solaris, and the administration is all Web-based. Enterprise
Server maintains its own user and rights list, and does not integrate its security with the
operating system.
￿
O’Reilly WebSite Pro is extremely popular with ISPs and companies that offer hosting services.
It is inexpensive and extremely easy to configure and maintain. An evaluation version is
available on the O’Reilly Web site.
￿
Apache is the most popular Web server on the Internet. It has a solid and proven track record,
and is available at no charge from the Apache Web site. It is, however, far more difficult to
install and configure than any of the other servers listed here. It is supported online by the user
community.
ColdFusion supports all of the servers listed here, and the code you write is portable among these
servers. This means that you can choose one option now and then change your mind later. While this
requires you to reconfigure your Web server itself, ColdFusion needs very little to be changed from a
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 6 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
ColdFusion standpoint.
TIP: IIS version 2 is the version of Microsoft IIS bundled with Windows NT 4. If you
have decided to use IIS as your Web server, it is worth your while to upgrade to IIS
version 4. You will gain many new features, including the capability to use ColdFusion
pages as default documents. To download the upgrade, visit the IIS page on Microsoft’s
Web site at http://www.microsoft.com/iis.
NOTE: The list given only has the Web servers that ColdFusion supports using server
APIs. Many other Web servers are supported via the ColdFusion CGI interface, but they
are not listed here. As explained in Chapter 2, the CGI interface to ColdFusion should
never be used if you can use the server APIs.
Installation Checklist
You're about to install ColdFusion. Before doing so, run through this checklist to make sure your
server is ready:
￿
Verify that the hardware you are installing ColdFusion onto meets the requirements previously
listed.
￿
Verify that a supported operating system is installed and that the TCP/IP protocol is installed
and working. (See the preceding section for details on how to test this.)
￿
Determine whether the operating system vendor has published patches or service packs. If any
do exist, you might want to consider applying them before proceeding.
￿
Make sure you have installed a supported Web server. See Table 3.1 for servers supported by
ColdFusion.
￿
Verify that the Web server is working. The simplest way to do this is load a browser on the
server and go to http://localhost. The Web server is working if the default home page comes
up.
￿
Make sure that you are logged in with administrative rights. (This step does not apply to
Windows 95 machines.)
￿
Make sure that there is sufficient disk space following the Web server installation.
Once you have checked off the items in this list, you'll be ready to install ColdFusion.
Installing ColdFusion
The ColdFusion installation program walks you through the entire installation process. It usually even
detects which Web server you have installed and configures ColdFusion accordingly.
NOTE: The installation instructions detailed here are for the Windows versions of
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 7 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
ColdFusion only, as that is the only version bundled with this book. If you have
downloaded the Solaris version of ColdFusion, refer to the documentation that came
with it for installation instructions.
Beginning the Installation Process
To start the installation program, run CF4EVAL.EXE found in the Evaluation directory on the
accompanying CD-ROM. If you have downloaded ColdFusion from the Allaire Web site, run that
executable instead. You should see a Welcome screen similar to the one shown in Figure 3.4.
FIGURE 3.4 The ColdFusion installation program walks you through the entire ColdFusion
process.
NOTE: All the installation instructions provided here apply to the live version of
ColdFusion, not just to the evaluation version provided on the CD-ROM. The only
difference between the two is that when installing the live version, you are prompted for
a serial number that you will receive along with the software.
Once you have agreed to the license conditions (and, if you are installing a live version of
ColdFusion, entered your serial number), you are prompted for the installation directory; this is
shown in Figure 3.5. The default directory is C:\CFUSION, but you may choose another directory if
you so desire. It is strongly recommended that you keep the default directory if possible.
FIGURE 3.5 To install ColdFusion on a directory other than the default, specify that directory
during the installation process.
The installation program attempts to automatically detect which Web server is installed and then
prompts you to verify the results (see Figure 3.6). If you have more than one Web server installed,
you are prompted for the server with which ColdFusion will be used.
FIGURE 3.6 The ColdFusion installation program attempts to automatically detect which Web
servers are installed.
TIP: If you are using one of the servers listed in Table 3.1 and the installation program
does not automatically detect it, cancel the installation. You might need to reinstall the
Web server before proceeding.
Once ColdFusion knows which Web server you are using, it attempts to determine the location of the
Web server's root directory. The ColdFusion examples, documentation, and Java applets are installed
into this directory's subdirectories. The installation program displays the directory that it wants to use,
as shown in Figure 3.7, and you may accept or change it.
FIGURE 3.7 Select Web server document directory.
Once you have specified the installation directories, you are prompted for the components to install.
The components available to you will vary based on the operating system you are using. Figure 3.8
shows the Select Components dialog box that you'll see if using Windows 95. Figure 3.9 shows the
Windows NT version. Table 3.2 lists the components and their descriptions, as well as the versions
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 8 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
and platforms they are available on.
FIGURE 3.8 Only a subset of the ColdFusion Application Server components may be installed on
Windows 95 and Windows 98.
FIGURE 3.9 The entire set of components may be installed if using Windows NT.
TABLE 3.2 ColdFusion Components
Component
Description
ColdFusion
Program Files
ColdFusion itself. This component is the only one that must be present for
ColdFusion to work. This option is available on all platforms.
Documentation
and Examples
Complete online documentation and example applications. This option is
available on all platforms.
CFXAPI Tag
Development Kit
Everything you need to create your own tags in Microsoft Visual C++ version 4
or later. If you do not have MSVC installed, there is no need to install this
component. If the installation program detects that MSVC is present,
ColdFusion tag wizards are automatically added to it. This option is available on
all platforms.
Load Balancing
Fault tolerance and load balancing features. This option is only available in the
Enterprise version of the product, and only when installing on Windows NT or
Solaris.
Advanced
Security Services
Advanced security and server sandbox support. This option is only available in
the Enterprise version of the product, and only when installing on Windows NT
or Solaris.
TIP: If you omit a component that you want to install at a later date, you can rerun the
installation program and just select that component.
Now you are prompted for two passwords, as seen in Figure 3.10 and Figure 3.11. The administrator
password is the password that is required to administer and configure ColdFusion using the Web-
based administration program. The ColdFusion Studio password is the one ColdFusion Studio users
need in order to access directories, files, and data sources on the server machine.
FIGURE 3.10 The ColdFusion Administrator password is used to configure and administer the
ColdFusion Application Server.
FIGURE 3.11 The ColdFusion Studio password is used by ColdFusion Studio users to access
services on the ColdFusion Application Server.
NOTE: If you are reinstalling ColdFusion, you are not prompted for the passwords--the
existing passwords are used.
You must provide these passwords; they can be the same password if you prefer.
SEE Chapter 4, "Administering ColdFusion," for more information about administering
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 9 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
and configuring ColdFusion, p. 57.
SEE Chapter 10, "Introduction to ColdFusion Studio," for more information about
ColdFusion Studio, and using it to access server files and data sources, p. 169.
TIP: The passwords specified here may be changed at a later time using the ColdFusion
Administrator described in Chapter 4.
The installation program now prompts you for the name of the program group to create; then you are
asked to verify all the options selected. Read through the settings, verify that they are correct, and
then click the Next button to perform the actual installation.
FIGURE 3.12 The Windows 95 and Windows 98 taskbar displays the ColdFusion Application Server
icons when ColdFusion is running.
You might be prompted to restart the server when you have finished installing ColdFusion.
Testing the Installation
Your next task is to test the installation using the provided test programs. As explained in Chapter 2,
the ColdFusion Application Server must be running in order to process ColdFusion pages.
If you are running Windows NT, select the Services applet from the Control Panel. You will see a
ColdFusion service listed, and the status should say Started. If the service is not Started, highlight it
and click the Start button.
If you are running Windows 95 or Windows 98, an icon is displayed in the taskbar when ColdFusion
is running, as shown in Figure 3.12. You may right click these icons to stop the server if needed. To
manually start the ColdFusion Application Server (if it has been stopped, or if it is shown in the
taskbar), select the ColdFusion menu option from the ColdFusion group beneath the Start button’s
Programs menu.
Once you have verified that ColdFusion is running, select the Welcome To ColdFusion option from
the ColdFusion group, which is beneath the Start button’s Programs menu. You should see a Getting
Started screen similar to the one shown in Figure 3.13.
FIGURE 3.13 The ColdFusion Getting Started screen provides quick access to documentation, Help,
testing tools, and links to Allaire.
Select the Test Your ColdFusion Installation option from the Here’s Where to Begin list. The Verify
Installation and Configuration screen, shown in Figure 3.14, allows you to perform a databases
lookup and display the results. You’ll know that the installation was successful when this operation
succeeds. Select a department from the Department drop-down list and then click the Verify Query
button. If everything is working correctly, you’ll see a results page like the one shown in Figure 3.15.
If not, a series of suggestions is made to help you resolve the problem.
FIGURE 3.14 The Verify Installation and Configuration page contains a series of tests to ensure
that ColdFusion is running properly.
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 10 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
FIGURE 3.15 The Test Query Results page displays data retrieved from an Access database if
ColdFusion is functioning properly.
TIP: The Installation Test page also contains links and instructions to other tests that you
can perform to verify the operation of other ColdFusion features. You may use this page
at any time to ensure that ColdFusion is running properly.
If you’ve made it this far--congratulations! You’re ready to begin application development.
Preparing to Install ColdFusion Studio
ColdFusion Studio is a complete development environment designed especially for ColdFusion
developers. You do not have to use Studio for your ColdFusion application development, but I
strongly recommend that you do. Studio is full of features that will both simplify your application
development and save you considerable amounts of time.
ColdFusion Studio comes bundled with a single user version of the ColdFusion Application Server.
This is primarily of use when you are writing your code on a computer other than the one running the
ColdFusion Application Server. The separate, local, single-user server allows you to test your
applications locally.
TIP: Studio is usually not installed on the Web server itself, but on any other computer
on the same network. Studio can also be installed on a computer on a remote site, in
which case it will communicate with the ColdFusion Application Server via any existing
TCP/IP connection.
Hardware Requirements
Studio runs on Windows 95, Windows 98,and Windows NT only. There is no 16-bit version of
Studio, nor is there a UNIX version. However, Studio running on Windows 95/98/NT can be used in
conjunction with ColdFusion Application Server running on any platform, including Solaris and
HP/UX.
Studio will run on any computer running Windows 95, Windows 98, or Windows NT (Intel only), but
a minimum of 32MB of RAM is recommended; 15MB of disk space is also needed to install Studio.
What’s on the CD-ROM
This book’s accompanying CD-ROM contains a 30-day evaluation version of ColdFusion Studio.
This is a complete version of Studio and it comes complete with all the documentation and Help. The
only restriction is that it will only run for 30 days. This should be enough time for you to evaluate the
product.
Once you have determined that Studio will work for you, you need to contact the Allaire Sales
department at 617-761-2000 to order a live copy. You can install the live version directly over the
evaluation version, and any options and settings will still be accessible to you.
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 11 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
The evaluation version of the ColdFusion Studio is saved in the ColdFusion directory on the CD-
ROM as Setup.EXE.
Installation Checklist
You’re about to install Studio. Before doing so, run through this checklist to make sure your system is
ready:
￿
Verify that the hardware you are installing ColdFusion Studio on meets the requirements
previously listed.
￿
Make sure you have sufficient disk space.
￿
If you are planning on using Studio’s remote access features, make sure that the TCP/IP
protocol is installed and working. (See this chapter’s previous details on how to test this.)
￿
Make sure that you are using the same version of both the ColdFusion Application Server and
ColdFusion Studio.
You’ll be ready to install Studio once you have checked off the items in this list.
Installing ColdFusion Studio
Just like ColdFusion itself, the Studio installation program makes installing ColdFusion Studio a very
simple task.
NOTE: All the installation instructions provided here apply to the live version of
ColdFusion Studio, not just to the evaluation version provided on the CD-ROM. The
only difference between the two is that when installing the live version, you are
prompted for a serial number, which you will receive along with the software.
Beginning the Installation Process
To start the installation program, run the CFSTUDIO4EVAL.EXE found in the Evaluation directory
on the accompanying CD-ROM. If you have downloaded ColdFusion Studio from the Allaire Web
site, run that executable instead. You should see a Welcome screen similar to the one shown in Figure
3.16.
FIGURE 3.16 The ColdFusion Studio installation program walks you through the entire Studio
installation process.
You are then prompted to agree to the license, as well as to enter a serial number (if you are installing
a live copy of the software) and the destination directory. Once you have provided this information,
you are prompted for the components to install, as shown in Figure 3.17. Unless you are suffering
from the lack of disk space, it's recommended that you keep both components selected.
FIGURE 3.17 You may select any or all ColdFusion Studio components to be installed.
The ColdFusion 4.0 Web Application Construction Kit - CH 3 - Installing ColdFusion an..Page 12 of 12
file://J:\prodinfo\MEMBERS\MA\ir045.html 3/23/01
The installation program now prompts you for the name of the program group to create. Then you are
asked to verify all the options selected. Read through the settings, verify that they are correct, and
then click the Next button to perform the actual installation.
Testing the Installation
To test Studio, just run the program by selecting it from the Studio program group under the Start
button’s Programs menu. You are welcome to try it out right now. However, Studio is discussed in
detail in Chapter 10.