30 November, 2006

Ubuntu 6.10(Edgy Eft) Apache2, PHP5, MySQL & Coldfusion Install Howto

Well, it's been ages since I posted anything, but after spending 3 days trying to get Apache, PHP, MySQL, and Coldfusion all installed on my linux box and finally reaching success, I figured I should document what I did in the hopes to save others out there three days of frustation and sore skulls.

I will have to give a few thanks to a few individuals throughout this as their parts helped me get it all together. I'll start at the beggining. From a fresh Edgy Eft install. Enter the following lines into a console:

Code:
sudo aptitude purge apache2 apache2-common php5 php5-common libapache2-mod-php5 mysql
sudo aptitude install apache2 apache2-common php5 php5-common libapache2-mod-php5 mysql
This purges all old installs and config files and then re-installs a fresh copy. Thanks goes to harisund on the ubuntuforums for this one. Saved me a lot of headaches throughout my days. You can see the original post here.

Once you've finished your apache, php, and mysql install I then did the following:

Code:
sudo aptitude install phpmyadmin
This installs the phpmyadmin package for mysql.

At this point you're probably wondering, "Why is he using aptitude and not apt-get?" Well, the main reason is that I found when using aptitude to install the basics when I tried to apt-get the rest I'd get varying results from success to complete failure. Aptitude generally always worked as long as I started the basics with aptitude.

At this point go to http://localhost and make sure that you're setup is working this far, you may even want to go to http://localhost/phpmyadmin and make sure that php is parsing pages properly.

If all is good (which is should be) you're now going to need two files to install Coldfusion. At the time of this post the most current linux installer for Coldfusion was coldfusion-702-lin.bin. You can get the current file from here. You will need an adobe.com account (free) and have to log in to get the download, which is rather large. Once you've selected your preferred download and got it on the way you'll have to go get the latest wsconfig.zip file from here.

Now because Edgy Eft uses a new Linux Kernel compared to Breezy you'll have to make a modification to the installer before you can install it. cd to your download directory and type the following into a console:

Code:
cp coldfusion-<version>-lin.bin coldfusion.bak
cat coldfusion.bak | sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" > coldfusion-<version>-lin.bin
This will comment out any instances of the term "export LD_ASSUME_KERNEL" as this seems to be incompatible with Edgy's version of libc6. Thanks to Kasp3r for this one, you can see the original post here. Now you can run the installer with the following command:

Code:
sudo sh coldfusion-<version>-lin.bin


Follow the steps to for install, you want to choose the following:
  • Server Configuration
  • Add A Sever Configuration (connector) - choose Apache
Apache Configuration is: /etc/apache2
Apache Binary is: /usr/sbin/apache2
Apache Script is: /usr/sbin/apache2ctl

Continue with the installation until completion.

Now you want to cd into your download directory where you downloaded the wsconfig.zip file to. Run the following command in a console:

Code:
sudo mv /opt/coldfusionmx7/runtime/lib/wsconfig.jar /opt/coldfusionmx7/runtime/lib/wsconfig.bak
sudo unzip wsconfig.zip -d /opt/coldfusionmx7/runtime/lib

You have now inflated the new wsconfig.jar to replace the old one. Now you want to do the following:

Code:
cd /opt/coldfusionmx7/bin
sudo ./coldfusion start

You will get some starting up text, and a connector error warning, we will fix that now. After the coldfusion server is started enter the following into the console:

Code:
sudo /opt/coldfusionmx7/runtime/bin/wsconfig

  • Choose Add
  • Select Apache and put /etc/apache2 into the configuration path
  • Check configure connectors select box
  • Click Advanced
  • put /usr/sbin/apache2 into the binary path field
  • put /usr/sbin/apache2ctl into the control script path field
  • Click Ok
  • Accept the option to restart the server.
Now you'll want to enter the following into a console:

Code:
sudo gedit /etc/apache2/apache2.conf

Look for DirectoryIndex and at the end of the line add the following seperated by spaces:

index.cfm default.cfm

Now you need to restart the Apache server:

Code:
sudo /etc/init.d/apache2 restart

Now try accessing http://localhost/CFIDE/administrator. If all goes well, you should have the coldfusion Administrator pop up in your browser. You now have PHP, MySQL, and Coldfusion configured on Apache2.

These methods worked for me, after days and days of trying. If you have any problems feel free to post and I'll try to help you sort it out, but I'm about the biggest linux newbie ever. Good luck!