Setting up Apache, OpenBD, Railo and ColdFusion - Part 3 - Installing ColdFusion and customizing the connector
ColdFusion, ServersThis is the third part in a series of posts on setting up ColdFusion, OpenBlueDragon, and Railo all on the same machine using Apache webserver to listen for all requests and direct traffic. Part 2 can be found here. You will find links to all parts of this series at the bottom under "Related Content"
With that said, this part in the series focuses on installing ColdFusion and configuring the webserver adapter in such a way that only specific Virtual Hosts will be set up to pass requests to the ColdFusion server. First we want to start by creating a localhost site that is specific to ColdFusion 8 in Apache. I tend to keep all my sites under /www which is actually symlinked to a 'www' in my home directory. I find a few benefits in this. First, I usually keep my home partition in shape and carry it around with me from distro to distro, so I always have my sites in tact with me. Secondly since it is a symlink to my home and not in a system folder I don't need special permissions to write in it. I will be following along this path, but if you keep your sites elsewhere, then you can adjust as necessary.
$ mkdir /www/localhost.cf8
$ sudo gedit /etc/apache2/sites-available/localhost.cf8
<VirtualHost *> ServerName localhost.cf8 <Directory /www/localhost.cf8/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> DocumentRoot /www/localhost.cf8 </VirtualHost>
$ sudo a2ensite localhost.cf8 Site localhost.cf8 installed; run /etc/init.d/apache2 reload to enable.
$ sudo gedit /etc/hosts
Now that we have a site ready, it is time for us to install ColdFusion. Once you have downloaded the .bin installation file from Adobe, browse to that directory in a terminal window. You may need to chmod the file to be executable, then launch it like this: $ chmod +x coldfusion-801-lin.bin sudo ./coldfusion-801-lin.bin
After the welcome screen, hit enter to continue. Next type "Y" and hit enter to agree to the terms and conditions. We are now faced with the installation type prompt. For this example of setting up a development environment, we will choose option 3 "Developer Edition" For our purposes we are going to choose the "Server configuration" option. However, it should be noted that you could quite easily choole the J2EE WAR file option and install into Tomcat as we did with OpenBlueDragon in Part 2 of thise series.
Since we are installing from scratch, we will choose "No" (2) on the next option which is asking if there is an existing version of ColdFusion 8 installed on this machine. For this installation we do not want any of the extra options to install such as Documentation, LiveCycle, Search Services, nor do we want to start on system init since this is on my laptop and I may not always want ColdFusion to start at boot. So we will uncheck all options like you see in this image and continue.
We are going to accept the default installation path of /opt/coldfusion8 Again, since this is a fresh installation, we are going to say "No" (2) to the prompt asking if there are earlier versions of ColdFusion on this computer. Now we start to work our way into the webserver configuration which will tie ColdFusion into Apache. To start, choose "Add Web Server Configuration" (1) when prompted, then choose "Apache" (1). In the following prompt asking for the Apache directory that contains your http.conf file, enter /etc/apache2 as you see in the picture below:
For the location of the Apache program binary file, enter /usr/sbin/apache2. For the Start/Stop script, enter /etc/init.d/apache2. You will see both of these choices here:
We now return to the first webserver configuration menu and this time choose "Continue with installation" (4). Then we will need to enter the location of the webroot. We are going to enter the directory of our new site /www/localhost.cf8 that we created above as you can see in the picture below. We will also be asked which user we would like ColdFusion to run as. I typically like to use my own user account for this so I don't end up with permissions issues where I have difficulty accessing files generated by ColdFusion
Now enter your admin password, and if you choose to user RDS, enter the password for it as well. It will now show you the general options you have selected and you will hit enter to start the actual installation. Once it completes and prompts you to "Press Enter to exit the installer", do so and then start the server with this: $ sudo /opt/coldfusion8/bin/coldfusion start
Once you are returned to a prompt, it is time to go customize the Apache connector stuff just a bit. open the httpd.conf file like this: $ sudo gedit /etc/apache2/httpd.conf
# JRun Settings LoadModule jrun_module /opt/coldfusion8/runtime/lib/wsconfig/1/mod_jrun22.so
<IfModule mod_jrun22.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /opt/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51801
#JRunConfig Errorurl url <optionally redirect to this URL on errors>
#JRunConfig ProxyRetryInterval 600 <number of seconds to wait before trying to reconnect to unreachable clustered server>
#JRunConfig ConnectTimeout 15 <number of seconds to wait on a socket connect to a jrun server>
#JRunConfig RecvTimeout 300 <number of seconds to wait on a socket receive to a jrun server>
#JRunConfig SendTimeout 15 <number of seconds to wait on a socket send to a jrun server>
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>DirectoryIndex index.cfm
$ sudo a2enmod cf8
<VirtualHost *>
ServerName localhost.cf8
<Directory /www/localhost.cf8/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
DocumentRoot /www/localhost.cf8
Include cf8connector
</VirtualHost>$ sudo /etc/init.d/apache2 restart
Now... if you are following along from earlier in this series, you should now be able to successfully connect to OpenBD at http://localhost.bd and ColdFusion 8 at http://localhost.cf8 On the next part of this series, we will bring Railo into the mix and finally have all three running on our system.
Next - Part 4 Installing Railo under Tomcat with Apache webserver





Loading....