These instructions cover installing ColdFusion 9 on VirtualBox.

:!: WARNING: These instructions are for MY use and may or may not work for you. If you erase your hard drive, blow up your computer or otherwise harm yourself, your cat or others while following these instructions I am not responsible.

What We Will Install

  • VirtualBox
  • Apache
  • Adobe ColdFusion 9
  • MySQL
  • phpMyAdmin

My Environment

  • Host: Windows Vista
  • Guest: Ubuntu 9.10

What You Need To Download

  • VirtualBox (latest version)
  • ColdFusion Server 9 (32bit for Ubuntu 9)
  • Ubuntu Server 9.10 (32 bit)

VirtualBox Installation and Configuration

This assumes some basic working knowledge of VirtualBox. You will need to mount iso images, etc. VirtualBox is very similar to VMWare and other virtual machines. If you have problems - please consult VirtualBox site for help.

  • Install VirtualBox
  • Configure port forwarding…
    • Edit: C:\Users\Jim\.VirtualBox\VirtualBox.xml
    • Add the following lines within the ExtraData section of VirtualBox.xml. Modify port numbers accordingly:
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" value="2222"/> 
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" value="22"/> 
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" value="TCP"/> 
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort" value="8888"/> 
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort" value="80"/> 
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol" value="TCP"/> 
  • Install Ubuntu Server
    • go with defaults
    • partition entire disk
    • if offered the choice DO NOT install the LAMP stack or any of the other bundles configurations
  • Install Apache ( sudo apt-get install apache2 )
  • Open a browser and confirm you can access: http:\\localhost
    • If not adjust port forwarding and try again!
  • Install MySQL ( sudo apt-get install mysql-server )
    • provide a root password for MySQL login
  • Install phpmyadmin ( sudo apt-get install phpmyadmin ) (installing this is optional)
  • Install VirtualBox Guest Additions
    • install some prerequisites ( sudo apt-get install build-essential linux-headers-`uname -r` )
    • click Devices > Install Guest Additions from main menu
    • mount the media: ( sudo mount /dev/cdrom /media/cdrom )
    • verify you can access guest addition files ( ls /media/cdrom )
    • run the appropriate installer ( sudo ./media/cdrom/VBoxLinuxAdditions-x86.run )
  • Setup shared drive to move files between Windows (host) and Linux (guest)
    • create a folder on the guest ( D:\temp\vm\shared ) and give it a name ( 'vbshared' )
    • creat folder on Linux ( sudo mkdir /media/vbshared )
    • mount the share within the guest ( sudo mount -t vboxsf vbshared /media/vbshared )

Snapshot

  • Now might be a good time to create a VirtualBox snapshot in case you screw up something below…

ColdFusion Installation

  • On the host - download ColdFusion for Linux into your shared directory ( D:\temp\vm\shared )
  • On the guest - install C++ library that is required by ColdFusion: ( sudo apt-get install libstdc++5 )
    • This doesn't appear to be in the Ubuntu repositories. Add a Debian mirror to your sources.list
      • Open /etc/apt/sources.list
      • Add a repository: deb http://ftp.us.debian.org/debian lenny main
      • Update apt: sudo apt-get update
      • Install library: ( sudo apt-get install libstdc++5 )
  • Run the ColdFusion installer 'sudo ./ColdFusion_9_WWE_linux.bin'
    • Follow installation prompts:
    • Click enter a zillion times and accept license agreement
    • Select to install the Developer Edition
    • I'm a KISS person so I select the basic Server configuration
    • Continue with defaults
    • Add a Web Server Configuration - Select Apache
    • Default paths:
      • Apache config: /etc/apache2
      • Apache binary: /usr/sbin/apache2
      • Control file: /etc/init.d/apache2
      • Webroot: /var/www
    • Skip OpenOffice integration
    • Enable RDS
    • Verify installation information
    • Start ColdFusion: sudo /opt/coldfusion9/bin/./coldfusion start
    • Try to access ColdFusion administrator: http://localhost/CFIDE/administrator/index.cfm
  • Configure ColdFusion to start on startup
    • Add to: /etc/rc.local - the following startup line: ./opt/coldfusion9/bin/coldfusion start
    • Reboot and verify it works correctly

Configure Your Shared Workspace

  • Setup shared drive for your workspace (this assumes you are using Eclipse)
    • On host: add the path to your Eclipse workspace ( D:\workspace ) and give it a name ( 'workspace' )
    • On guest: create a folder ( sudo mkdir /var/www/workspace )
    • Change owner: ( sudo chown nobody workspace )
    • Mount the share within the guest ( sudo mount -t vboxsf workspace /var/www/workspace )
    • Edit rc.local: ( sudo vi /etc/rc.local )
  • Configure the mount points to be persistent so they will remain after a reboot (you don't need sudo!)
mount -t vboxsf vbshared /media/vbshared
mount -t vboxsf workspace /var/www/workspace 

Snapshot

  • This is another great spot to stop and take a VirtualBox snapshot! :-D

Apache Configuration / Virtual Directories

  • Configure Apache to handle index.cfm files
    • edit /etc/apache2/mods-enabled/dir.conf and add index.cfm to the list of file names
  • Create a Virtual Directory in Apache
    • Navigate to: /etc/apache2/sites-available
    • Copy default to 'yoursitename'
    • Modify accordingly ( ServerName yoursitename.localhost )
    • Modify hosts file accordingly ( add a record for yoursitename.localhost )
    • Enable the new site ( sudo a2ensite yoursitename ) this will create the appropriate links to: /etc/apache2/sites-enabled
    • Run a2dissite to disable a site!
    • Reload the Apache config ( /etc/init.d/apache2 reload )
    • Attempt to access new site at http://yoursitename.localhost

Useful Links

 
/home/thecrumb/public_html/wiki/data/pages/virtualbox_and_coldfusion_9.txt · Last modified: 2010/02/08 13:28 by thecrumb
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki