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!

10 comments:

morgdenn said...

This was great, it all worked perfectly! The only thing missing was you need to restart apache after you edited the apache2.conf

sudo /etc/init.d/apache2 restart

Wulfshayde said...

Of course! You always miss one step in a tutorial guide don't you, thanks for pointing it out Morgan, editing now.

Wulfshayde said...

Hey Mick,

Thanks for that correction. You might need to chmod your www folder. I don't know if it's the best method but I sudo chmod 777 /var/www -R to solve all my access problems (/var/www is my htdocs folder). There's probably a safer method, but this got me going. I'll correct that typo.

Cheers,
Jeff

Shakur7 said...

Hi

I've done everyting as mentioned this far. This is the 2nd installation of Ubuntu 6.10 Server and haven't succeed with CFMX7 yet. Which version of Ubuntu 6.10 Edgy Eft u using? Desktop or Server? I've got the server and getting the following error after running "sudo /opt/coldfusionmx7/runtime/bin/wsconfig":

root@ubuntu:/opt/coldfusionmx7/bin# sudo /opt/coldfusionmx7/runtime/bin/wsconfig.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/coldfusionmx7/runtime/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPriviliged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)
at sun.awt.DebugHelper.(clinit)(DebugHelper.java:29)
at java.awt.Component.(clinit)(Component.java:506)
at jrunx.connectorinstaller.ConnectorInstaller.main(ConnectorInstaller.java:741)

Anyone done instructions for Ubuntu 6.10 Server how to do the things manually, that wsconfig.jar would do?

Shakur7 said...

"Click Advanced"

Heh, k, maybe I try the Desktop version then. However, the server edition would've suited me better.

Guess the server is missing some sort of java thingies...

MTBiker said...

Hey,
Thanks for the great article. Couple of questions for you. is this on the server or desktop version of Edgy? Also, is the wsconfig file when ran a GUI window?

Thanks,
Mark

Wulfshayde said...

Been ages since I've checked my blog, life of a developer I guess. Sorry for the delay guys. I did this on the desktop edition, not server, so it is true that there may be some things missing in the server version. When you double click on the wsconfig.jar file it should open as a gui. Hope this answers some questions.

Cheers,
Jeff

Unknown said...

Great..

I've just done an update of my Debian Sarge to Debian Etch, and now I'm trying to get ColdfusionMX7 to work again!

Your howto (I know it's for Ubuntu) did help me a bit, but I'm stuck at /opt/coldfusionmx7/runtime/bin/wsconfig (we do not use sudo)

I get a Exception in thread "main" host:/opt/coldfusionmx7/bin# error, and can not add the needed info :/

Anyone here who might have a fix for this?

Wulfshayde said...

resize,

sudo = su on most other Linux os's. Try to run the wsconfig as su and that should help.

Cheers!

Unknown said...

I am using ColdFusion 8 on Ubuntu.
I am able to use the wsconfig, but I do get a warning that I need to update my version of Jrun in order to use it??

Basically I can enter all the information in the wsconfig, but the "OK" button is disabled. Is there anything I can do?

I am a newbie on Linux.
Thanks,
John