Skip to Content

Ubuntu and ColdFusion 8? You bet!

Some of my customers use ColdFusion for their web application needs, rather than ASP.NET, or PHP. ColdFusion is a good language for rapid development, and is flexible enough to handle just about any task you can think of. But getting ColdFusion running on a Linux server has always been a bit of a challenge. The last time I tried, CF expected files to be in very specific locations - typically the Red Hat file structure. So if you opted to try running CF on a different distribution like Suse or Debian, you were either out of luck or facing a great deal of manual effort working out what symbolic links were needed. Today I successfully got CF 8 running on a Ubuntu server, with little effort. So things have come a long ways since CF 6 (the last time I tried CF on Linux).

To start with, I created a VMWare virtual machine with a Ubuntu 7.10 server running on it. I installed Apache with the usual "apt-get install apache2". Then I tweaked Apache's default virtual host to match my own likes (I prefer to put my web pages into /home/www rather than /var/www), but this step wasn't needed - especially if you are not comfortable working with Apache.

Next I downloaded and ran the Coldfusion-8-lin.bin file (the standard English download for Linux). There seems to be a small glitch with the installer in that you get to answer Yes or No to the Licenses, then a short while later you get to do it again. Maybe Adobe is *just* being sure. Or maybe I need to stop and *really* read what they are saying. But other than that the installer works as expected.

CF has had the option of an "internal"/"local" web server using the JRUN services since version 5. But if you are intending external access to your webserver, you were better off setting up a true server such as Apache or IIS, and telling CF to use that instead. CF 8 is no different - the installer allows you to set up a web server configuration, or just accept the default for the internal JRUN server. Of course, I opted for the web server config approach. In this step I was prompted for the locations of various files Apache uses - the location of the main configuration files (/etc/apache2/), the location of the Apache executable file (/usr/sbin/apache2), and the location of the "control file" used to start/stop Apache (/etc/init.d/apache2).

The only other questionble point is what user CF run as. This defaults to "nobody", which is a suitable option. The rest of the steps are very straight forward, or self explanatory. Like entering the CF Admin password, or enabling RDS (or not) and what the RDS password is.

The only additional step I did was to add a symbolic link to the CF control file.

ln /opt/coldfusion8/bin/coldfusion /etc/init.d/coldfusion 

This allows me to restart CF with the usual /etc/init.d/coldfusion restart (or start/stop) command.

I made sure CF was started, then opened up the administrator page. The CF installer tells you these steps when it completes.

So now I have a functional CF server running under Ubuntu 7.10, and once I migrated over one of my development sites, I know CF is functioning properly. This just means I have a crap-load of work to do as my app was written for CF 6 on a windows server. So I have some code that doesn't work in CF 8 (function names duplicate a new, native function name), and because I'm now through Apache (rather than IE), my paths are case sensitive. So *some* work to do, but this was needed anyways - the application needs an overhaul to make use of modern technologies.