coldfusion
I’ve made the case for ColdFusion, but you still need to know how to install it! In this tutorial, I’ll show you how to install ColdFusion 6.1 on a Windows machine, and walk you through the basic set up process. If you’re not running Windows, don’t worry: you can skip ahead to the setup procedure and follow along as we tweak the server to fit your needs.
我已经介绍过ColdFusion了 ,但是您仍然需要知道如何安装它! 在本教程中,我将向您展示如何在Windows计算机上安装ColdFusion 6.1,并引导您完成基本的设置过程。 如果您没有运行Windows,请不要担心:您可以跳过设置过程,并按照我们的要求调整服务器。
We’ve all heard how powerful ColdFusion is and most of us have experienced this power at one time another. We’ve also heard how easy it can be to program in ColdFusion versus other languages that are currently available. But, one thing you don’t hear is how easy it is to install and set up a ColdFusion server. To some, setting up and configuring the server is child’s play; to others, it’s not so easy.
我们都听说过ColdFusion的功能强大,并且我们大多数人一次又一次地体验到了这种力量。 我们还听说了与当前可用的其他语言相比,用ColdFusion编程很容易。 但是,您没有听到的一件事就是安装和设置ColdFusion服务器有多么容易。 对于某些人来说,设置和配置服务器是一件很容易的事。 对其他人来说,并不是那么容易。
In this tutorial, I’ll show you how to set up a ColdFusion Development server on your home computer (Windows 2000 or XP), and how to get it to work with Apache 2.x (I’ll show you how to install this as well).
在本教程中,我将向您展示如何在家用计算机(Windows 2000或XP)上设置ColdFusion Development服务器,以及如何使其与Apache 2.x一起使用(我将向您展示如何安装此服务器。以及)。
Before we begin, you’ll need a few things:
在我们开始之前,您需要做一些事情:
A copy of ColdFusion MX (I’ll show you how to get a copy if you don’t already have a CD) 一份ColdFusion MX的副本(如果您还没有CD,我将向您展示如何获取副本) A computer with the following minimum requirements: 具有以下最低要求的计算机: Intel Pentium Processor (or AMD equivalent) 英特尔奔腾处理器(或等效的AMD) 256 MB of RAM (512 MB or 1 GB would be best) 256 MB RAM(最好是512 MB或1 GB) 400MB of hard disk space (this is only for the server; you’ll need more space for your sites and code) 400MB的硬盘空间(仅用于服务器;您将需要更多空间用于站点和代码) A copy of the Apache 2.x installer Apache 2.x安装程序的副本 Time: set aside an hour or more for the install and configuration. If you go through this whole guide, you might want to allow two hours. Of course, it’ll take longer if you have to download the software. 时间:预留一个小时或更长时间进行安装和配置。 如果您阅读了整个指南,则可能需要两个小时。 当然,如果必须下载该软件,则需要更长的时间。Now that you know what you need, it’s time to begin.
现在您知道了您的需求,是时候开始了。
To start, I’ll assume you don’t have ColdFusion MX 6.1 on CD. So, head over to the Macromedia Website and download the developer edition (If you have DreamWeaver MX or MX 2004 you can get the CF server off this CD).
首先,我假设您没有CD上的ColdFusion MX 6.1。 因此,请转到Macromedia网站并下载开发人员版本 (如果您有DreamWeaver MX或MX 2004,则可以从此CD中获得CF服务器)。
Depending on how often you visit Macromedia.com you’ll either automatically be shown the page to download the ColdFusion MX 6.1 server (see image below), or you’ll be shown a login screen. If you have an account with Macromedia, log in at this time; if not, you’ll need to register for a Macromedia account before you’ll be allowed to download the ColdFusion Server.
根据访问Macromedia.com的频率,您将自动显示页面以下载ColdFusion MX 6.1服务器(请参见下图),或者将显示登录屏幕。 如果您拥有Macromedia帐户,请此时登录;否则,请重新登录。 如果不是,则需要先注册一个Macromedia帐户,然后才能下载ColdFusion服务器。
From here, you’ll want to select either the ColdFusion MX 6.1 Developer Edition or the ColdFusion MX 6.1 Trial Edition. It doesn’t matter which you select because, after 30 days, the trial edition becomes the Developer Edition.
从这里,您将要选择ColdFusion MX 6.1开发人员版或ColdFusion MX 6.1试用版。 选择哪个都无关紧要,因为30天后,试用版将变为Developer Edition。
You’ll want to select the Windows version of the server in your language. For me, this was the English Windows Version (if you want to follow along with another operating system, feel free to grab the version for your OS).
您需要用您的语言选择Windows版本的服务器。 对我来说,这是英文Windows版本(如果要跟其他操作系统一起使用,请随意获取适用于您操作系统的版本)。
Once you’ve made your selection, click the "Download" button to begin the download. I recommend you either save it to your desktop, your C drive, or anywhere you’ll be able to find it. Keep in mind that this file is 152.71 MB — it’ll take a bit of time to download. I’m on a cable modem with a 4 MB pipe, and it took me about 10 minutes at 250-270KB/Second.
做出选择后,单击“下载”按钮开始下载。 我建议您将其保存到桌面,C驱动器或任何可以找到它的位置。 请记住,此文件为152.71 MB-下载需要一些时间。 我使用的是带有4 MB管道的电缆调制解调器,以250-270KB /秒的速度花了大约10分钟。
If you run download manager software, be aware that it might not be able to download the ColdFusion server from Macromedia’s Website. I use GetRight and I have to turn it off before I can download the file.
如果您运行下载管理器软件,请注意,它可能无法从Macromedia的网站下载ColdFusion服务器。 我使用GetRight,必须先关闭它,然后才能下载文件。
Now that you’ve downloaded the file, let’s begin the installation process.
现在您已经下载了文件,让我们开始安装过程。
Before you can begin the installation of ColdFusion, you’ll need to have a Web server installed and running. I’ve chosen Apache for this tutorial, since it’s readily available and familiar territory to most Web developers. For those who are new to Apache, there’s no need to worry –Apache has a huge community following of very helpful people, many of who can also be found in the SitePoint forums.
在开始安装ColdFusion之前,您需要安装并运行Web服务器。 我选择本教程的Apache是因为它对于大多数Web开发人员来说都是现成的并且熟悉的领域。 对于那些不熟悉 Apache的人,无需担心– Apache拥有一个由非常有用的人组成的庞大社区,其中许多人也可以在SitePoint论坛中找到。
You may wonder why I didn’t choose IIS, which is available on Windows 2000 and XP Pro. The answer is that these servers only allow you to install one Website. Yet, most people who undertake development work typically work on more than one site at a time. And this, among others, was the reason I decided to avoid it. For more information, check out IISAnswers.
您可能想知道为什么我没有选择Windows 2000和XP Pro上提供的IIS。 答案是这些服务器仅允许您安装一个网站。 但是,大多数从事开发工作的人通常一次只能在一个以上的站点上工作。 这就是我决定避免它的原因。 有关更多信息,请查看IISAnswers 。
If you don’t already have it installed, download the latest copy of Apache. For the purposes of this article, I downloaded Apache 2.0.50 for Windows. I grabbed the MSI installer rather than the .zip installer, but you can use either. If you are new to Apache, or you’re a Microsoft power-user, I highly recommend the MSI option, as it’s a snap to install.
如果尚未安装,请下载Apache的最新副本 。 出于本文的目的,我下载了适用于Windows的Apache 2.0.50。 我抓住了MSI安装程序,而不是.zip安装程序,但您都可以使用。 如果您是Apache的新手,或者您是Microsoft的高级用户,我强烈建议您选择MSI选项,因为它很容易安装。
Once you’ve downloaded the MSI installer, double-click on it to start the install process. You’ll see a start up screen which looks like this:
下载MSI安装程序后,双击它以开始安装过程。 您会看到一个启动屏幕,如下所示:
Click the Next button, and you’ll be presented with the License Agreement.
单击下一步按钮,将显示许可协议。
Read through it, select the "I accept…" radio button, and click Next.
通读它,选择“我接受…”单选按钮,然后单击“下一步”。
Here you see the "Read This First" screen. This contains a lot of legal jargon and sees the Apache folks give credit where credit is due. Again, read through it and click Next.
在这里,您会看到“首先阅读本文”屏幕。 这包含了很多法律术语,并且看到Apache员工在应得的荣誉中给予了荣誉。 再次,通读它,然后单击下一步。
Now, you’re asked to fill in your Network Server Name and Admin email address. Feel free to enter "localhost" for the network Domain and the Server Name, and to enter your email address.
现在,要求您填写网络服务器名称和管理员电子邮件地址。 随时为网络域和服务器名称输入“ localhost”,并输入您的电子邮件地址。
At the bottom of the screen you’ll see questions about installing Apache HTTP Server 2.0 programs and shortcuts. I chose the "for All Users" option as I’m the only user on my computer, and I want Apache to start at load and run as a service.
在屏幕底部,您将看到有关安装Apache HTTP Server 2.0程序和快捷方式的问题。 我选择了“为所有用户”选项,因为我是计算机上的唯一用户,并且我希望Apache在加载时启动并作为服务运行。
If your computer has multiple users, and you’re security-conscious, I’d recommend you select the "only for the Current User" option. This option runs the server on port 8080, and requires you manually to start Apache each time you want to use it. It’s a bit more work, but this option also gives you complete power over the service, and when it runs.
如果您的计算机有多个用户,并且您具有安全意识,建议您选择“仅适用于当前用户”选项。 此选项在端口8080上运行服务器,并且每次使用它时都需要您手动启动Apache。 这需要更多的工作,但是此选项还可以使您完全掌控该服务以及该服务何时运行。
When you’ve finished filling out the network information, click on Next — you’ll see the Setup Type screen. You can either choose the Typical or Custom. In my opinion, you should only choose custom if you need certain things NOT to be installed, or if you want to tweak something. Otherwise, the Typical option is perfect for 99% of us. Click Next and let’s move on.
填写完网络信息后,单击下一步-您将看到“安装类型”屏幕。 您可以选择“典型”或“自定义”。 我认为,只有在不需要安装某些东西或要进行调整时,才应选择“自定义”。 否则,“典型”选项非常适合我们中的99%。 单击下一步,继续。
The next screen is your Destination Folder screen. This is where you can tell Apache to install; it’s also at this point that Apache configures the default Website for you (a few folders down, actually). Again, unless you have reason or knowledge enough to change it, just leave it as is and click the Next button.
下一个屏幕是“目标文件夹”屏幕。 您可以在这里告诉Apache安装。 也是在这一点上,Apache为您配置了默认网站(实际上是几个文件夹在下面)。 同样,除非您有足够的理由或知识来更改它,否则请保持不变,然后单击“下一步”按钮。
The final screen you see will be your "ready to install" prompt. This is you last chance to hit the back button and make any changes to your configuration. If you’re ready to install, click on the Install button and relax while Apache is installed and started.
您看到的最后一个屏幕将是“准备安装”提示。 这是您最后一次单击后退按钮并对配置进行任何更改的机会。 如果准备安装,请单击“安装”按钮,然后在安装和启动Apache时放松。
Once Apache is installed, confirm that it’s running (you should see the icon in your system tray). If it’s not, start it up from your Start > Programs > Apache 2.x folder.
安装Apache之后,确认它正在运行(您应该在系统任务栏中看到该图标)。 如果不是,请从“开始”>“程序”> Apache 2.x文件夹中启动它。
You can also open up your browser and browse to http://localhost/, where you should see the default Apache welcome page.
您也可以打开浏览器并浏览到http:// localhost /,您将在其中看到默认的Apache欢迎页面。
Once you’ve confirmed that Apache has started, go ahead and close any windows that are open. We’ll come back to Apache later. Now, it’s time to install the ColdFusion Server!
确认Apache已启动后,继续并关闭所有打开的窗口。 稍后我们将返回Apache。 现在,该安装ColdFusion服务器了!
I’m installing on my Windows XP laptop (P4 3.06GHz, 1 GB RAM), and most of the screen shots you see from this point will reflect this. Those using Windows 2000 should be able to follow with little or no difficulty.
我正在Windows XP笔记本电脑(P4 3.06GHz,1 GB RAM)上进行安装,这时您看到的大多数屏幕截图都将反映出这一点。 那些使用Windows 2000的用户应该能够很少或完全没有困难。
This is also a good time to point out that the Developer Edition can be installed on Microsoft Windows 98, ME, NT 4 SP6A, 2000 SP3, XP, or 2003. The 98 and ME installations are only for development purpose, however, and will not support a production-level service.
这也是指出开发人员版可以安装在Microsoft Windows 98,ME,NT 4 SP6A,2000 SP3,XP或2003上的好时机。但是,98和ME安装仅用于开发目的,并且将不支持生产级服务。
Double click the installation file (coldfusion-61-win.exe) to start the process. You should see the following window.
双击安装文件( coldfusion-61-win.exe )开始该过程。 您应该看到以下窗口。
This shows that the installer is preparing the files for installation and extracting everything to a temp folder. Just sit back and give the installer a few seconds to do its thing.
这表明安装程序正在准备要安装的文件并将所有内容提取到temp文件夹中。 只需坐下来,给安装程序几秒钟的时间即可。
When you see this window, select your language and click OK. It’s more than likely that only one choice will be available — the language you downloaded — but double-check just to make sure.
当您看到此窗口时,请选择您的语言,然后单击“确定”。 您下载的语言很有可能只有一种选择,但请仔细检查以确保。
After you click OK, you’ll see this window:
单击“确定”后,您将看到以下窗口:
This is just an introduction that tells you what you’re about to do. Here, it tells you this wizard is designed to install CF MX 6.1 on your computer, or generate an EAR or WAR file for a J2EE server installation. If you don’t know what an EAR or WAR is, don’t worry about it — we won’t go down that road in this article.
这只是一个介绍,它告诉您您将要做什么。 在这里,它告诉您此向导旨在在计算机上安装CF MX 6.1,或为J2EE服务器安装生成EAR或WAR文件。 如果您不知道EAR或WAR是什么,请不必担心-在本文中我们不会走这条路。
Click Next, and you’ll be presented with the License Agreement for the server. Feel free to read through it and make an informed decision before you select the "I accept" radio button and click Next. Of course, if you don’t accept it, you can’t install the server, and you won’t need to finish the rest of this article…
单击“下一步”,系统将显示该服务器的许可协议。 在选择“我接受”单选按钮并单击“下一步”之前,请通读它并做出明智的决定。 当然,如果您不接受它,则无法安装服务器,也不需要完成本文的其余部分……
After you click the acceptance radio button, you’ll be presented with a screen at which you can do something! OK, it’s not much, but it is one of two critical points during this installation.
单击接受单选按钮后,将显示一个屏幕,您可以在该屏幕上执行操作! 好的,虽然不多,但这是安装过程中的两个关键点之一。
The next screen is the Install Type window.
下一个屏幕是“安装类型”窗口。
At this window, you’ll want to select the "Install new version of ColdFusion MX" and check off the "Developer Edition (Single-IP Only)" option. If you want to, you can select the 30-day trial (Enterprise Edition), but you’d only do this is if you planned to buy the server in the next 30 days, or you needed to have multiple IPs hit the server during the next 30 days.
在此窗口中,您将要选择“安装ColdFusion MX的新版本”,然后选中“ Developer Edition(仅适用于Single-IP)”选项。 如果愿意,您可以选择30天试用版(企业版),但只有在计划在接下来的30天内购买服务器,或者您需要在服务器使用多个IP的情况下才选择这样做接下来的30天。
After 30 days, the Trial Edition becomes a Developer Edition, which means the server is limited to a single IP access, but this doesn’t hinder any of the features. Basically, you’ll have a copy of Enterprise Edition that can be accessed by the local computer (127.0.0.1 / localhost) and one outside IP address. This is nice if you decide to set this server up on a dedicated computer and do you coding on another computer, then upload to the server for debugging and testing.
30天后,试用版将变为开发人员版,这意味着服务器仅限于单个IP访问,但这并不妨碍任何功能。 基本上,您将拥有一份Enterprise Edition副本,可以由本地计算机(127.0.0.1 / localhost)和一个外部IP地址访问。 如果您决定在专用计算机上设置此服务器,并在另一台计算机上进行编码,然后上传到服务器进行调试和测试,则很好。
Click the Next button to see this screen, which presents three different installation choices.
单击“下一步”按钮以查看此屏幕,其中显示了三个不同的安装选项。
The installer is a bit vague here, so hopefully my explanations will be a little more enlightening.
安装程序在这里有点模糊,因此希望我的解释会有所启发。
Server Configuration – This is the option you’ll check for the purposes of this tutorial, and probably for most of your future installations. This option creates ColdFusion as a standalone server that hooks into your Web server (IIS, Apache etc). This is the way most of the earlier versions of ColdFusion were installed, and is probably the option you’ll be most comfortable with.
服务器配置–您将在本教程中以及以后的大多数安装中检查此选项。 此选项将ColdFusion创建为挂接到Web服务器(IIS,Apache等)的独立服务器。 这是大多数早期版本的ColdFusion的安装方式,并且可能是您最满意的选择。
J2EE Configuration (ColdFusion MX with JRun 4) – You’d choose this option if you wanted to install ColdFusion as a J2EE application and run it on the Macromedia JRun Application Server. If you are familiar with Applications Servers (Websphere, JRun, Sun One, Tomcat etc.) then you might like this option — especially if you plan to integrate or tie in a lot of Java programming.
J2EE配置(带有JRun 4的ColdFusion MX)–如果要安装ColdFusion作为J2EE应用程序并在Macromedia JRun应用程序服务器上运行它,则选择此选项。 如果您熟悉Application Servers(Websphere,JRun,Sun One,Tomcat等),那么您可能会喜欢此选项-特别是当您计划集成或绑定许多Java编程时。
J2EE Configuration (EAR/WAR file) – This is the option you’d select if you wanted to install ColdFusion as a J2EE Application on another Application Server. This will create an EAR or a WAR file that you can then deploy onto your J2EE server and run ColdFusion from.
J2EE配置(EAR / WAR文件)–如果要在另一个应用程序服务器上将ColdFusion作为J2EE应用程序安装,则可以选择此选项。 这将创建一个EAR或WAR文件,然后您可以将其部署到J2EE服务器上并从中运行ColdFusion。
The two J2EE options will not be covered here, as they can be extremely complicated for those with no or little J2EE Application Server experience.
这里不介绍这两个J2EE选项,因为对于没有或没有J2EE Application Server经验的人来说,它们可能会非常复杂。
For our purposes, we’ll select Server configuration and click the Next button.
为了我们的目的,我们将选择“服务器配置”,然后单击“下一步”按钮。
The next screen you’ll see asks where you want to install the ColdFusion server.
您将看到的下一个屏幕询问您要在何处安装ColdFusion服务器。
I recommend you just leave this at the default unless you have specific reason to install it somewhere else.
我建议您将其保留为默认设置,除非您有特殊原因将其安装在其他地方。
If you accidentally type something here, or decide against putting the files into another directory, you can just click the "Restore Default Directory" button to have it default back to the C:CFusionMX folder.
如果您不小心在此处键入了某些内容,或者决定不将文件放入另一个目录,则只需单击“还原默认目录”按钮,即可将其默认返回C:CFusionMX文件夹。
After you’ve told the installer where to install ColdFusion, you’ll need to tell it where to install the CF Administrator. I recommend you leave this at the default setting unless you changed something during your Apache installation.
告诉安装程序在哪里安装ColdFusion之后,您需要告诉它在哪里安装CF Administrator。 我建议您将此设置保留为默认设置,除非您在Apache安装过程中进行了更改。
Go ahead and click the Next button. You should see a screen which looks like this:
继续,然后单击下一步按钮。 您应该看到一个类似于以下的屏幕:
This screen allows you to select the Web Server that you want ColdFusion to configure for use with ColdFusion MX and your CFML pages.
该屏幕使您可以选择想要ColdFusion配置为与ColdFusion MX和CFML页面一起使用的Web服务器。
You’ll notice that there are no Web Servers/Sites listed here, but don’t worry — this is OK. We have to tell ColdFusion we want to use the Apache Web server. To do this, click the Add button.
您会注意到这里没有列出Web服务器/站点,但是不用担心-可以。 我们必须告诉ColdFusion我们要使用Apache Web服务器。 为此,请单击添加按钮。
At this point, you could select the "Built-in Web server (Development use only)" option, since we’re building a development environment. I tend to shy away from this option, though, because I’m a firm believer in having your development environment mimic your production environment as closely as possible. For example, if you use the built-in Web server, but your host has Apache, and you have problems with your code at your host, but not locally, you could spend hours or days spinning your wheels.
此时,由于我们正在构建开发环境,因此可以选择“内置Web服务器(仅供开发使用)”选项。 但是,我倾向于避开此选项,因为我坚信让您的开发环境尽可能地模仿您的生产环境。 例如,如果您使用内置的Web服务器,但是您的主机使用的是Apache,并且您在主机(而不是本地)上遇到代码问题,则可能要花费数小时或数天的时间。
Once you click that button, you’ll get a new window into which you’ll input some data. The window should look like this once you fill it out:
单击该按钮后,将出现一个新窗口,您将在其中输入一些数据。 填写后,窗口应如下所示:
Make sure you select Apache as your Web Server and, if you left the defaults for your Apache installation, you can use "C:Program FilesApache GroupApache2conf" for the Configuration Directory and "C:Program FilesApache GroupApache2binApache.exe" as the Directory and file name of server binary.
确保选择Apache作为Web服务器,如果您保留了Apache安装的默认设置,则可以将“ C:Program FilesApache GroupApache2conf”用于配置目录,将“ C:Program FilesApache GroupApache2binApache.exe”用作目录和文件服务器二进制文件的名称。
When you’re done, click the OK button. You screen should now look like this:
完成后,单击“确定”按钮。 屏幕现在应如下所示:
Once you’ve made your selection, click the Next button to continue the process. You’ll be presented with a screen that asks for the ColdFusion MX Administrator Location. This gives you the opportunity to identify where you want to put the CFIDE folder and all its contents (which includes the CF Admin code). Again, I recommend leaving this at the default directory unless you have a specific site set up for the administrator, or have a good idea of what you’re doing.
做出选择后,单击“下一步”按钮继续该过程。 系统将显示一个屏幕,询问您ColdFusion MX管理员位置。 这使您有机会确定要放置CFIDE文件夹及其所有内容(包括CF管理员代码)的位置。 再次,我建议将其保留在默认目录中,除非您为管理员设置了特定的站点,或者对自己的工作有所了解。
When you’re done, click the Next button once again. You’ll be presented with a screen that allows you to type in your Administrator Password — the password you’ll use for the ColdFusion Administrator Login.
完成后,再次单击“下一步”按钮。 屏幕上将显示一个屏幕,您可以输入管理员密码—用于ColdFusion管理员登录名的密码。
I recommend you start a good practice here, and choose a strong password. Try to think of something that has letters in upper and lower case, and try to toss in some numbers and maybe even a special character or two. The more cryptic you can be, the better. Even though this is just a development environment, it’s never too late to get into the habit of using good security practices.
我建议您从此处开始一个良好的做法,并选择一个强密码。 试着想一些大写和小写字母的事物,并尝试折腾一些数字,甚至可能是一个或两个特殊字符。 您可以变得越神秘,越好。 即使这只是一个开发环境,养成使用良好安全实践的习惯也永远不会太晚。
Once you’ve entered your password into the text fields, click the Next button. You should be presented with the Installation Confirmation screen.
在文本字段中输入密码后,单击“下一步”按钮。 应该显示“安装确认”屏幕。
This will outline the choices you made, and some of the data you entered. Feel free to review this screen and, when you’re ready, click the Install button.
这将概述您所做的选择以及您输入的一些数据。 随时查看此屏幕,并在准备好后单击“安装”按钮。
Once you’ve clicked the Install button, you’ll be launched into the install process. Depending on the speed of your machine, this could take a few minutes up to a few moments. You’ll be kept in the loop during the installation by messages that appear below the CF logo. In this image, the installer tells us it’s installing the Core ColdFusion Files.
单击“安装”按钮后,将启动安装过程。 根据您机器的速度,这可能需要几分钟到几分钟的时间。 CF徽标下方显示的消息将使您在安装过程中始终处于循环状态。 在此图中,安装程序告诉我们正在安装Core ColdFusion文件。
A word to the wise: if you start the ColdFusion installation process, don’t stop it. Sure, there’s a cancel button in the lower left corner, but I’ve had reports from many people that canceling at this point will corrupt the installation and prevent further installations from occurring. Just let the installer do its thing and, if you have to, you can always uninstall and reinstall after this process is complete.
明智的选择:如果您开始ColdFusion安装过程,请不要停止它。 当然,在左下角有一个“取消”按钮,但是我收到许多人的报告,这时取消将破坏安装并阻止进一步的安装。 只需让安装程序来完成它,如果有必要,您可以在此过程完成后始终卸载并重新安装。
When the installer is finished, you’ll see the following:
安装程序完成后,您将看到以下内容:
Go ahead and click the "Done" button, and you’ll see a browser window that will open the ColdFusion Administrator Login page.
继续并单击“完成”按钮,您将看到一个浏览器窗口,它将打开ColdFusion管理员登录页面。
If, when your browser opens, you see a blank page or an HTTP 500 Internal Server Error, don’t worry. We just have to do a bit of configuration within Apache to get things running perfectly. Keep this window open and continue to the next part of this article for more details.
如果在打开浏览器时看到空白页或HTTP 500内部服务器错误,请不要担心。 我们只需要在Apache内进行一些配置即可使一切正常运行。 使此窗口保持打开状态,并继续进行本文的下一部分以获得更多详细信息。
Apache requires very little post-installation modification, however this doesn’t mean there isn’t anything we can’t do. I always double-check to make sure the "install" script did what it was supposed to while editing the httpd.conf.
Apache几乎不需要进行安装后修改,但这并不意味着我们没有什么可以做的。 我总是仔细检查以确保“ install”脚本在编辑httpd.conf时执行了预期的操作。
If you haven’t confirmed that Apache is running, open your browser and point it to http://localhost/ (unless you specified a real URL during installation). You should be greeted with the wonderful Apache test page! If you see an error, review the steps above to make sure you followed all the Apache installation steps, and check your log files for more detailed errors.
如果您不确定Apache是否正在运行,请打开浏览器并将其指向http:// localhost /(除非在安装过程中指定了真实URL)。 您应该会得到一个很棒的Apache测试页面! 如果看到错误,请查看上述步骤以确保您遵循所有Apache安装步骤,并检查日志文件以获取更多详细的错误。
Now we know Apache is running, but how about ColdFusion? Point your browser to http://localhost/CFIDE/administrator/index.cfm and see what happens. One of three possible failures could occur:
现在我们知道Apache正在运行,但是ColdFusion呢? 将浏览器指向http://localhost/CFIDE/administrator/index.cfm,看看会发生什么。 可能发生的三种故障之一:
Failure #1: Your browser prompts you to save the .cfm file to your computer.
失败#1:您的浏览器提示您将.cfm文件保存到计算机。
Failure #1: Your browser prompts you to save the .cfm file to your computer.Resolution: Two things come to mind as quick fixes here. The first is to restart Apache, since it probably hasn’t been restarted since you installed ColdFusion. The second is to check your httpd.conf file to make sure the ColdFusion module is being loaded. Locate your httpd.conf file (mine was in C:Program FilesApache GroupApache2conf), and see if you can’t locate this line:
失败#1:您的浏览器提示您将.cfm文件保存到计算机。 解决方案:这里有两件事可以快速解决。 第一种是重新启动Apache,因为自安装ColdFusion以来可能尚未重新启动它。 第二种是检查您的httpd.conf文件,以确保正在加载ColdFusion模块。 找到您的httpd.conf文件(我的文件位于C:Program FilesApache GroupApache2conf中),然后查看是否找不到此行:
LoadModule jrun_module "C:/CFusionMX/runtime/lib/wsconfig/1/mod_jrun20.so"I ran a search for mod_jrun20.so and got two hits, one of which was a comment.
我搜索了mod_jrun20.so并得到了两个匹配,其中之一是评论。
If this line exists, it’s probably near the very bottom of your httpd.conf file. This isn’t a big deal, but to make life easy, cut and paste it to appear as the last entry with your other LoadModule commands, which are located shortly after the "Listen 80" line.
如果存在该行,则可能在您的httpd.conf文件的最底部。 没什么大不了的,但是为了使生活更轻松,请剪切并粘贴它,使其与其他LoadModule命令一起显示为最后一个条目,这些命令位于“ Listen 80”行之后。
Once you’ve got your load module line in the httpd.conf file, check to make sure index.cfm is one of the DirectoryIndex options. Just search the httpd.conf file for this command — you should see it appended to the end of the list. If you want you can add index.cfml to this list as well.
在httpd.conf文件中找到加载模块行后,请检查以确保index.cfm是DirectoryIndex选项之一。 只需在httpd.conf文件中搜索此命令-您应该看到它附在列表的末尾。 如果愿意,也可以将index.cfml添加到此列表中。
Restart Apache and browse to the http://localhost/CFIDE/administrator/index.cfm URL. If everything looks good, skip ahead to the Configuring ColdFusion section of this article. If you’re still receiving errors, check your log files and confirm that the CFIDE folder and files are installed inside your webroot directory (C:Program FilesApache GroupApache2htdocs).
重新启动Apache并浏览到http://localhost/CFIDE/administrator/index.cfm URL。 如果一切看起来不错,请跳到本文的“配置ColdFusion”部分。 如果仍然收到错误,请检查您的日志文件并确认CFIDE文件夹和文件已安装在您的webroot目录中( C:Program FilesApache GroupApache2htdocs )。
Failure #2: You get a message that the CFIDE folder doesn’t exist or that it can’t find the file.
失败#2:您收到一条消息,提示CFIDE文件夹不存在或找不到文件。
Failure #2: You get a message that the CFIDE folder doesn’t exist or that it can’t find the file.Resolution: it’s more than likely that this folder and its files were placed somewhere else, or that you’ve got Apache looking into a folder that’s different from the one into which you told the ColdFusion installer to install the CF Administrator. The first thing to do is to check that the CFIDE folder is in your webroot folder. If it is, check your Apache httpd.conf file to ensure the "DocumentRoot" line reflects the location you gave to the ColdFusion installer to install the CF Administrator. If you have to make any changes to httpd.conf file, be sure to save and restart Apache before you try to visit the URL.
失败#2:您收到一条消息,提示CFIDE文件夹不存在或找不到文件。 解决方法:该文件夹及其文件很可能放置在其他位置,或者您可能让Apache查看的文件夹不同于您告诉ColdFusion安装程序安装CF Administrator的文件夹。 要做的第一件事是检查CFIDE文件夹是否在您的webroot文件夹中。 如果是这样,请检查您的Apache httpd.conf文件,以确保“ DocumentRoot”行反映了您提供给ColdFusion安装程序以安装CF Administrator的位置。 如果必须对httpd.conf文件进行任何更改,请确保在尝试访问URL之前保存并重新启动Apache。
Failure #3: If you’ve got an error which isn’t mentioned in #1 or #2, or you’re still having problems, you’ve probably configured something incorrectly. Double check the steps above to make sure you followed them correctly. If you find you didn’t miss or skip anything, I recommend you make a post in the ColdFusion forums here at SitePoint to get help.
失败#3:如果您遇到了#1或#2中未提及的错误,或者仍然存在问题,则可能是您配置了错误的内容。 仔细检查上述步骤,以确保您正确地遵循了它们。 如果您发现自己没有错过或跳过任何内容,建议您在SitePoint的ColdFusion论坛中发布帖子以获取帮助。
Now that Apache is installed and configured, and ColdFusion is installed, it’s time to begin the configuration of ColdFusion MX 6.1.
现在已经安装并配置了Apache,并且已经安装了ColdFusion,是时候开始配置ColdFusion MX 6.1了。
You can confirm that you have both Apache and ColdFusion installed and running by browsing to http://localhost/CFIDE/administrator/index.cfm. You should be greeted with a screen similar to this:
您可以通过浏览到http://localhost/CFIDE/administrator/index.cfm来确认已安装并正在运行Apache和ColdFusion。 屏幕应该类似于以下内容:
Go ahead and type in your ColdFusion Administrator Password. In the next few screens, we’ll set up some basic initial configuration and post installation tasks for ColdFusion.
继续并输入您的ColdFusion管理员密码。 在接下来的几个屏幕中,我们将为ColdFusion设置一些基本的初始配置和安装后任务。
The first screen will let us set up our RDS system. Personally, I’m not a big fan of RDS, especially on a Production server, but I understand that many Dreamweaver users love it. On a development box, I see no problem with it, so I recommend you leave it installed and set your RDS password to match your ColdFusion Administrator password.
第一个屏幕将使我们设置RDS系统。 就个人而言,我并不是RDS的忠实拥护者,尤其是在生产服务器上,但我知道许多Dreamweaver用户都喜欢它。 在开发箱上,我认为它没有问题,因此建议您保留它的安装状态,并设置RDS密码以与ColdFusion Administrator密码匹配。
If you are doing this on a production server, I strongly recommend you investigate the vulnerabilities of running RDS, and choose a strong password that’s nothing like your ColdFusion Administrator password.
如果您在生产服务器上执行此操作,强烈建议您调查运行RDS的漏洞,并选择一个与ColdFusion Administrator密码不同的强密码。
Disabling the RDS will not hinder anything you develop, but it will mean that you can’t use the Directory Browsing Applets in the ColdFusion Administrator. This is not a big deal if you know the layout of your server, but the applets can be a time and configuration life-saver. Again, choose the option that’s best for your development shop and protocols.
禁用RDS不会阻止您开发任何东西,但这意味着您不能在ColdFusion管理员中使用目录浏览小程序。 如果您知道服务器的布局,这没什么大不了的,但是小程序可以节省时间和配置。 同样,选择最适合您的开发商店和协议的选项。
Once you’ve entered your password (twice), click the Next button. This next screen installs the ODBC services. Be patient — the screen will automatically refresh once the installation is done.
输入密码(两次)后,单击“下一步”按钮。 下一个屏幕将安装ODBC服务。 请耐心等待-安装完成后,屏幕将自动刷新。
You shouldn’t encounter any errors at this point, but if you do post them in SitePoint’s ColdFusion forums and get some help before you proceed.
您现在应该不会遇到任何错误,但是如果您确实将它们发布在SitePoint的ColdFusion论坛中,并在继续之前获得一些帮助。
The next screen asks you if you want to install the sample applications with which ColdFusion is bundled.
下一个屏幕询问您是否要安装与ColdFusion捆绑在一起的示例应用程序。
As the text warns, you shouldn’t do this on a production server. However, on a development server, this can be a good thing, especially if you’re brand new to ColdFusion, or like to have real world code to reference while building your applications.
文本警告,您不应在生产服务器上执行此操作。 但是,在开发服务器上,这可能是一件好事,特别是如果您是ColdFusion的新手,或者喜欢在构建应用程序时参考真实世界的代码。
I’ve never installed these sample applications, but I suggest you learn more about them and make your own decision.
我从未安装过这些示例应用程序,但是我建议您进一步了解它们并做出自己的决定。
After you make your selection, click on the Next button to continue. If you opted not to install the sample applications, wait a few moments while the script processes. You should end up with this screen:
做出选择后,单击下一步按钮继续。 如果您选择不安装示例应用程序,请在脚本处理过程中稍等片刻。 您应该以以下屏幕结束:
Go ahead and click the OK button. You’ll be presented with the ColdFusion Administrator. When you first load up the ColdFusion Administrator, you’ll see a screen similar to this:
继续并单击“确定”按钮。 您将看到ColdFusion管理员。 首次加载ColdFusion Administrator时,您将看到类似以下的屏幕:
This screen is the main landing page for the ColdFusion Administrator. The area outlined in red (only in this article; it’s not actually red in the Administrator) is what I call the "Action" area. This is where you’ll either "Do" something, like configure a data source, mapping etc., or "Get" information, such as reading your log files or using the Code Analyzer.
该屏幕是ColdFusion管理员的主要登录页面。 红色区域(仅在本文中;管理员中实际上不是红色区域)是我所说的“动作”区域。 在这里,您可以“执行”操作(例如配置数据源,映射等),也可以“获取”信息(例如读取日志文件或使用代码分析器)。
The area outlined in yellow (again only for demonstration purposes) is the menu area. If you’ve used ColdFusion 5, you’ll notice that this menu is a bit more compact and cleaner. Also, you’ll note that all your "activities" are kept on one page.
以黄色勾勒的区域(再次仅用于演示目的)是菜单区域。 如果您使用过ColdFusion 5,您会注意到该菜单更加紧凑和简洁。 另外,您会注意到所有“活动”都保存在一页上。
For those that aren’t familiar with it, ColdFusion 5’s Administration menu had 3 buttons along the top that allowed you to change the menu and dive deeper into ColdFusion 5. Some liked this approach; others disliked it. Apparently those who disliked it won out, because we see this new menu in ColdFusion MX (6.x).
对于那些不熟悉它的人,ColdFusion 5的“管理”菜单的顶部有3个按钮,可让您更改菜单并更深入地进入ColdFusion 5。 其他人不喜欢它。 显然,那些不喜欢它的人赢了,因为我们在ColdFusion MX(6.x)中看到了这个新菜单。
Now, I’m going to show you some very basic settings to get you started. For a more in-depth overview of the ColdFusion Administrator, you’ll have to wait for my next article, where we’ll go through the ColdFusion Administrator bit by bit.
现在,我将向您展示一些非常基本的设置,以帮助您入门。 有关ColdFusion Administrator的更深入概述,您必须等待我的下一篇文章,在这里我们将逐步介绍ColdFusion Administrator。
One of the more popular areas of the ColdFusion Administrator is the Data Source area. It is in here that you set up and configure your data sources for use in your ColdFusion programming.
数据源区域是ColdFusion管理员中比较受欢迎的区域之一。 在这里,您可以设置和配置数据源,以用于ColdFusion编程。
To get started, click on the "Data Source" link in the left-hand menu. You should see a screen that looks like this:
首先,请点击左侧菜单中的“数据源”链接。 您应该看到一个如下所示的屏幕:
There are two areas of interest here. The first is the Add New Data Source box, which is where you’ll add new data sources to your ColdFusion server. The second is Connected Data Sources, which lists all data sources currently set up and configured on this server.
这里有两个有趣的领域。 第一个是“添加新数据源”框,您可以在其中将新数据源添加到ColdFusion服务器。 第二个是“连接的数据源”,它列出了当前在此服务器上设置和配置的所有数据源。
Lets start by creating a data source to a MS SQL server (the following screens will be very similar for other data sources).
让我们从创建MS SQL Server的数据源开始(以下屏幕对于其他数据源将非常相似)。
First, we need to type in a Date Source Name for this connection. For this test, I’ll call it TestConnection1. We then select our drive from the Driver drop down menu, and click the Add button in the Add New Data Source area.
首先,我们需要为此连接输入日期源名称。 对于此测试,我将其TestConnection1 。 然后,从“驱动程序”下拉菜单中选择驱动器,然后在“添加新数据源”区域中单击“添加”按钮。
Once you fill in the Data Source Name, select a Driver and click the Add button. You’ll be presented with the following screen.
填写数据源名称后,选择一个驱动程序,然后单击添加按钮。 您将看到以下屏幕。
On this screen, type in the name of your Database, the name of the Server (fully qualified domain name; IP address or network name), the Port on which the server is running, the username and password for connecting to this database, and a short description.
在此屏幕上,输入数据库名称,服务器名称(完全限定的域名; IP地址或网络名称),服务器运行所在的端口,用于连接到该数据库的用户名和密码,以及简短说明。
You can leave all these blank, but that is, of course, pointless. Some people do prefer only to enter the database name and server, and leave the username and password blank; these then have to be passed in via your cfquery tag. Unless you have a reason to this, I recommend you fill in this form as completely as possible, so that, when it comes time to code your application, all you have to remember is the Data Source Name.
您可以将所有这些留空,但这毫无意义。 有些人确实只希望输入数据库名称和服务器,而将用户名和密码留为空白。 然后必须通过您的cfquery标记传递这些内容。 除非有理由,否则建议您尽可能完整地填写此表单,以便在需要编写应用程序代码时,只需记住数据源名称即可。
Once you’ve completed the form, click the Submit button. ColdFusion will try to establish a connection to this data source to ensure that it exists and can be reached with the given values. Any connection or authentication errors will be reported back so that you can resolve the issue at hand. Also note that at any time you can click on the "Verify All Connections" button in the main Data Sources page to have ColdFusion check all the current configured data sources.
填写完表格后,单击“提交”按钮。 ColdFusion将尝试建立与此数据源的连接,以确保它存在并且可以使用给定的值进行访问。 任何连接或身份验证错误都将被报告回来,以便您可以解决当前的问题。 还要注意,您可以随时单击“数据源”主页面中的“验证所有连接”按钮,以使ColdFusion检查所有当前配置的数据源。
Besides data sources, one other area that you might need to jump into sooner, rather than later, is Mappings. Locate the Mappings link in the menu area and click on it to get this screen.
除了数据源之外,映射可能是您需要尽快而不是稍后进入的另一个领域。 在菜单区域中找到“映射”链接,然后单击以获取该屏幕。
Mappings are like virtual directories in IIS, or short-cuts in windows. When you create a mapping, it tells the ColdFusion server to "treat this directory reference as xyz". Mappings allow you to avoid the relative dot nightmare when traversing outside your root folder. Let me try to illustrate this for you.
映射就像IIS中的虚拟目录,或者Windows中的快捷方式。 创建映射时,它告诉ColdFusion服务器“将该目录引用作为xyz处理”。 映射使您避免在根文件夹之外遍历时的相对噩梦。 让我尝试为您举例说明。
Let’s say your webroot is at c:webrootwwwmysite1 and you want to create an includes directory, but you don’t want to reference it as ../../includes. With a mapping, you will be able to tell ColdFusion that any reference to /includes = ../../includes.
假设您的webroot位于c:webrootwwwmysite1并且您想要创建一个include目录,但是您不想将其引用为../../includes 。 使用映射,您将能够告诉ColdFusion对/includes = ../../includes任何引用。
To accomplish this, put /includes in the Logical Path text field and the c:webrootincludes into the Directory Path text field. Now, whenever you reference /includes in your code, ColdFusion will automatically know to reference files in c:webrootincludes.
为此,在逻辑路径文本字段中输入/includes ,在目录路径文本字段中输入c:webrootincludes 。 现在,每当您在代码中引用/includes时,ColdFusion都会自动知道要引用c:webrootincludes文件。
Mappings are extremely useful when you have multiple sites on a box. You could create a mapping for each site (mysite1, mysite2, mysite3) and, instead of referencing each as c:webrootwwwmysite1 or c:webrootwwwmysite2, you could simply reference it as /mysite1 or /mysite2.
当一个盒子上有多个站点时,映射非常有用。 您可以为每个站点( mysite1 , mysite2 , mysite3 )创建一个映射,而不是将每个站点都引用为c:webrootwwwmysite1或c:webrootwwwmysite2 ,只需将其引用为/mysite1或/mysite2 。
That’s it for this tutorial! Feel free to spread your wings a bit and poke around other areas of the ColdFusion Administrator, and keep an eye out for my next article, where we’ll go through each item from top to bottom.
本教程就是这样! 随意张开翅膀,在ColdFusion Administrator的其他区域戳一下,并留意我的下一篇文章,我们将从上到下逐一讨论每个项目。
翻译自: https://www.sitepoint.com/install-coldfusion-mx-windows/
coldfusion
相关资源:ColdFusion安装指南