Tutorial:

This post is a semi-tutorial for the installation and configuration of Adobe Coldfusion 8 on an Ubuntu 7.10 Gutsy Gibbon desktop edition LAMP server running apache2, php5, mysql5, and phpmyadmin. I say semi-tutorial cuz this post assumes your set up is like mine as laid out in my previous post, “Tutorial: LAMP Server On Ubuntu 7.10 Desktop“. If your setup differs from mine, this post may not work for you. Oh also, I’m a TOTAL LINUX NEWBIE so thats my upfront disclaimer. This is just what worked for me. At the end of this post, you’ll find links to the sites I found helpful in this process. To the authors of said links, thank you for your help. It was awesome of you to post your experiences, and with them I found it easier to wade through this process. I hope others find my post as helpful. So here we go (this is long).

1. Go to www.adobe.com/go/trycoldfusion. To download cf8, you’ll need an adobe account, but its free and takes one minute to register.

2. The file you want is obviously the linux one: Coldfusion-8-lin.bin. Download it to your machine.

3. Notice the checksum for the file is listed there on the download page. Once its finished downloading, run md5sum in a terminal:

$ cd downloaddirectory
$ md5sum Coldfusion-8-lin.bin

and compare the result against the one posted on the Adobe download page. At the time of this posting, the checksum is:

ce9bb2af5cbf908cbd4403ce506335ef

If the checksums do not match, it means the file is bad, so delete the file and download it again.

4. By default, the binary does not have executable permissions, so if you try to run it, either nothing will happen or it will try to open in a text editor lol. To see what I’m referring to, while still in the terminal in your download directory, enter this:

$ ls -l

and you will see a line preceding the Coldfusion-8-lin.bin file that looks like:

-rw-r--r--

These are the file’s permissions, which show as only for reading and writing, but it needs x’s, so run this:

$ chmod +x Coldfusion-8-lin.bin

and it is now an executable application. To see this via command line, run ls -l again, you’ll see:

-rwxr-xr-x

5. Now run the binary, but you’ll need to run it as sudo, otherwise you’ll get part way into the installation and it will tell you that it requires root privileges to continue:

$ sudo ./Coldfusion-8-lin.bin

The next several steps will walk you through the installation process. Note that at any time you can go back to a previous step in the installation process by typing ‘back’. You may also type ‘quit’ to quit, but quitters never … something something (i stopped listening and missed the rest of the maxim).

6. Language? type ‘1′ for ‘english’.

7. Press enter through all the legal prompts, reading each page line by line of course ;).

8. Install type? For me this will be a developer machine on my home network so number ‘3′, I choose you.

9. Server configuration? I don’t need anything fancy so i type ‘1′ for the standard server configuration. Your mileage may vary.

10. Is there already a server configuration of coldfusion 8 installed? ‘2′ for no.

11. I disabled the documentation but left everything else cuz i might use it. One could make the argument that disabling the documentation is a good idea for security reasons, but like I said before, this machine is on my home network so it doesn’t really matter as much. I just don’t need the documentation. There’s plenty of good sites for that (maybe someday mine will be one of them).

12. Installation folder? I went with the default: /opt/coldfusion8

13. More legal stuff if you are installing Adobe LiveCycle Data Services. I might use Adobe AIR at some point so I went ahead and installed that.

14. Serial number? Left it blank for Developer Edition.

15. Earlier version? ‘2′ for no.

16. Add Web Server Configuration? Here, I diverge from most of the other tutorials I found on this subject. The majority of people seem to be skipping the Apache configuration here, finishing the install, then copying various connector files and restarting various services after the installation is completed. This may have been something necessary for Coldfusion 7. If so, I can’t speak to that. But instead of doing all that, I went the route of adding the configuration for Apache during the installation. So choose the number for ‘Add Web Server Configuration’, then select the number for ‘Apache’ at the next prompt.

17. Key file locations the installation asks for next are:

Apache configuration file: /etc/apache2
Apache binary file: /usr/sbin/apache2
Apache control file: /usr/sbin/apache2ctl

18. Once this is done, you’ll know cuz you’ll see the option to edit the Apache configuration you just added. But we don’t want to do that so type ‘4′ instead to continue the installation.

19. For the web root and Coldfusion Administrator location, I went the default Apache web root on my machine: /var/www

20. Runtime user? Whatever user you want.

21. Password? That user’s password.

22. RDS enabled? I said yes for the moment even though my plan is to set up Subversion at some point in the near future.

23. RDS password? um, macaroni.

24. Review the installation configuration, then press enter to make it all happen. Mmm, feels good. On my machine this last part (of the first part? o_0 ) took less than five minutes. Once its done, you’ll get this:

You have successfully completed
the first step in installing Adobe Coldfusion 8.
To continue with your installation,
go to /opt/coldfusion8/bin and type
"./coldfusion start" to start your server.
Once the server is started,
log in to the configuration wizard at
http://[machinename]/CFIDE/administrator/index.cfm

25. So do that, but as sudo:

$ cd /opt/coldfusion8/bin
$ sudo ./coldfusion start

Coldfusion should start in a few seconds then tell you that it will be writing its logs to /opt/coldfusion8/logs/cfserver.log

26. Now take a breath.

27. Open your preferred browser *cough* firefox *cough* and navigate to http://localhost/CFIDE/administrator/index.cfm. Once you sign in using the username and password you just provided at setup, it should automatically finish its own configuration, then take you to the Coldfusion Administrator’s main page.

28. So lets test Coldfusion by creating and saving a .cfm page that we’ll navigate to in a moment. Create and open the file:

$ gksudo gedit /var/www/index2.cfm

Once the text editor appears, add the below lines and save:

<cfset request.greeting = "hello from coldfusion" />
<cfoutput>#request.greeting#</cfoutput>

29. Now navigate to http://localhost/index2.cfm. Does Coldfusion greet you? I hope so. It did me. I feel all warm and fuzzy-like.

30. Now lets make sure we can connect to the MySQL service. Go back to the Coldfusion Administrator, click the Data Sources link in the left pane, then in the form on the right add the name of one of your MySQL databases, select MySQL (4/5) as your Driver (assuming thats the version you’re running. it is if you followed my lamp server tutorial from yesterday) and click Add.

On the next screen enter the Database name again, set the Server as 127.0.0.1 since MySQL is running on the same machine as Coldfusion, and enter the username and password for your MySQL user account. Click Submit. It should verify the connection for you upon submitting where at the top of the main page you should see:

* data source updated succesfully.

31. So now that we’ve got a data source set up in the Coldfusion Administrator, lets go back and edit our index2.cfm:

$ gksudo gedit /var/www/index2.cfm

adding a query and query output to make sure we can connect to MySQL. Please note that the database name, table name, and field names will change according to your own setup.

<cfquery name="fetch" datasource="testdatabase">
    SELECT *
    FROM thetable
</cfquery>
<cfoutput query="fetch">
    <br/>#fetch.fieldname# - #fetch.otherfieldname#
</cfoutput>

32. Save your changes, and refresh your browser. You should now see the output of your specific table. If so, congratulations, you are now successfully running Coldfusion 8 with Apache 2, and MySQL 5 on Ubuntu 7.10 desktop edition. Think of all the fun acronyms you can refer to your machine as now: CAMU, CAML, MACL, the list goes on.

Extra credit: If you’re tuning in after following my LAMP server tutorial from yesterday, you may want to navigate back to http://localhost/ and notice that the index.php file we created yesterday still echoes “hello there” indicating that PHP is still parsing as it should. The Coldfusion installation and Apache configuration did not break PHP. They are both sharing Apache and running out of the same directory. This is exactly what I wanted as like I said, this is a development machine, wherein I will be writing various things in either PHP or Coldfusion. Maybe both? (Maybe not). The other benefit for Coldfusion of simultaneously running a PHP setup on the same server is that you can use the phpMyAdmin to administer your MySQL needs. And also, there’s one more letter to slap onto your Acronym. I think I’m going to call this setup a CLAMP server. Yes, CLAMP it is. Shiny. Good luck to all and I hope this tutorial helps someone.

Credits and references (thanks again to the authors):

CF8 on Ubuntu Feisty Fawn
CFMX7 on Ubuntu Feisty Fawn
CFMX7.02 on Ubuntu Edgy Eft

9 Responses to “Tutorial:”

  1. Daniel Says:

    I couldn’t understand some parts of this article Tutorial: Adding Coldfusion 8 to your Ubuntu LAMP server, but I guess I just need to check some more resources regarding this, because it sounds interesting.

  2. PO Says:

    Hi Tyler,
    Thanks for the tutorial was really useful to step in Linux…

  3. Phpmyadmin Tutorial Says:

    Good site I “Stumbledupon” it today and gave it a stumble for you.. looking forward to seeing what else you have..later

  4. Carl Anderson Says:

    Could you post the coldfusion lines added to the apache httpd.conf file? My CF install did not add the load module lines to the httpd.conf file.

    I seem to be getting some strange error when I try to start coldfusion…
    Configuring the web server connector (Launched on the first run of the ColdFusion 8 start script)
    Running apache connector wizard…
    ColdFusion 8 not started, will retry connector 12 more time(s)

    ColdFusion 8 not started, will retry connector 1 more time(s)
    The connector wizard has not been able to contact the local ColdFusion 8, connector installation aborted.

    Thanks.

  5. Matt Osbun Says:

    Excellent tutorial. I’m a recent Linux convert, and going from Windows and IIS to Linux and Apache has been a bit of a challenge. I can honestly say that I’ve never been so happy to see the CF Administrator. Well, except for the time I tried to get cute with JRun, CF, and IIS on my work laptop and ended up not being able to serve up CF pages at all…

    Now- to go tackle MySQL.

  6. Linux Lamp Server Says:

    I found your site on faves.com bookmarking site.. I like it ..gave it a fave for you..ill be checking back later

  7. Kathy Says:

    Wonderful pages! Keep up the grat work.

  8. Timmy Says:

    Your work is marvelous!!i

  9. Willem Says:

    Just wanted to say hellol