With the 8.0.1 update of ColdFusion, OS X 10.5 Leopard is natively supported. To install ColdFusion you simply download the 32-bit or 64-bit version of the OS X installer and walk through the installation screen. The steps I outlined below, getting a custom compiled version of the Apache 2.2.x connector are no longer necessary as CF8 ships with an appropriate connector.
I've had ColdFusion 8 running on OS X 10.5 (Leopard) and hooked to Apache 2.2.6 for a while now. However, two things have occurred that are prompting me to write this blog entry. First, I've gotten several questions on exactly how I got things working - even with the other blog entries that outline a similar process. Second, I ran into an odd issue Friday when configuring everything on my new work MacBook Pro.
This is a small part of an article I'm writing for the Fusion Authority Quarterly Update Volume 2 Issue 4, due out in February. The information is so important I felt it could not wait, and am publishing this with permission from Fusion Authority. In this blog post, I will discuss the installation issue and its resolution, and provide my consolidated, easy steps for getting ColdFusion 8 hooked to Apache 2.2.x on Leopard.
Friday's issue manifested itself during the installation of ColdFusion 8. If you choose to "hook" CF8 to Apache during the install process, to have CF8 start during system startup, or to install the multiserver configuration, the installer will prompt you to enter your OS X password. After entering my password, I received a message stating I could not install CF8 because it appeared I did not have the appropriate permissions. The installer went on to say it determined this by attempting to create a folder in /Library/StartupItems/.
To troubleshoot the issue I performed several tests. First, I entered an incorrect OS X password in the password and password confirm fields. The CF8 installer gave me the same message. That confirmed I was probably dealing with a permissions issue. To double-check, I entered the passwords in again - this time the correct ones - and still received the same message. At this point, I wanted to verify my OS X password by logging out of Leopard and back in again. Before doing that, I decided to change my password to something that didn't include special characters (like $$ signs), thinking these characters could be throwing off the installer commands. After logging out and back in again and trying the installer with my new password, I received the same error message. On a hunch, I decided to check the permissions of the native OS X CF8 installer file. Comparing the permissions of the file to another OS X machine showed a difference, "Staff" and "Everyone" had read only access on my work machine, while the machine that already had ColdFusion 8 installed showed read/write permissions for all users/groups. To change the permissions on my work machine, I clicked the lock icon in the bottom right corner of the File Info window. After giving Staff and Everyone read/write access, I was back in business and the ColdFusion installer worked. So why did this occur on my new machine and not others? It's probably because I dragged the CF8 installer file from a USB drive to my MacBook Pro. I haven't tested this, but I've read OS X handles file permissions differently, depending on whether you actually "copy" a file or drag it from place to place.
Now, for my steps on getting ColdFusion 8 installed and hooked to Apache on Leopard:
1. Download CF8 installer from http://www.adobe.com/go/trycoldfusion
2. Double-click the installer file to launch the wizard.
3. As you progress through the screens, be sure to select Multiserver Configuration (I always multi-instance CF).
4. On the Configure Web Server screen, select the option to configure a Web server. Select Apache in the drop-down.
For Configuration Directory type: "/private/etc/apache2"
NOTE: Other bloggers have mentioned typing "/etc/apache2" here. This is also fine as that directory is a symbolic link to the REAL directory /private/etc/apache2.
For Directory and file name of server binary type: "/usr/sbin/httpd"
For Directory and file name of server control script type: "/usr/sbin/apachectl"
5. The installer will do its thing and then you'll get a message about successfully installing CF8 BUT that the Web server and/or Web site do not appear to be running. You're directed to start the Web server and then run the Configuration Wizard:
Just click Ok when you see the message above and move to the next step.
6. Download the recompiled, 64-bit Web server connector from Scott Pinkston:
7. Make sure Apache is stopped. In Terminal, navigate to the /usr/sbin directory and type "sudo apachectl stop"
8. Copy mod_jrun22.so from the zip you downloaded and paste it into the following directory:
9. Restart Apache. From /usr/bin in Terminal, type "sudo apachectl start &". The ampersand instructs OS X to start the Apache process in the background. This keeps the process from being attached to your Terminal session.
10. Stop all CF/JRun services (just in case they are running). From /Applications/JRun4/bin/ type "./jrun4 stop cfusion" and "./jrun4 stop admin" and "./jrun4 stop samples". Don't worry about the messages you get from typing the commands.
11. Open Activity Monitor (the OS X app) and look for any services called "jrun." If any are listed (be sure "All processes" is listed in the drop-down at the top of Activity Monitor), quit them by selecting them and pressing the Quit button, then the Force Quit button to confirm.
12. Start CF8 in Terminal: from /Applications/JRun4/bin type: "./jrun4 start cfusion &"
13. Go to your browser and visit http://localhost/CFIDE/administrator/index.cfm. Be sure and type the filename (index.cfm). You will be prompted to enter your CF Admin password, at which point CF will run through the configuration process and direct you to the CF Admin.
Now you can go back to Apache and set up Virtual Hosts or add "index.cfm" to the global DirectoryIndex directive.