<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sebastian Mogilowskis Blog &#187; multiserver</title>
	<atom:link href="http://www.mogilowski.net/lang/en-us/tag/multiserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mogilowski.net</link>
	<description>Just another blog about administration, linux and other stuff</description>
	<lastBuildDate>Thu, 26 Apr 2012 06:44:10 +0000</lastBuildDate>
	<language>en-us</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Install Coldfusion 8 Multiserver on Debian 5.0 Lenny with Apache 2</title>
		<link>http://www.mogilowski.net/lang/en-us/2009/02/23/install-coldfusion-8-multiserver-on-debian-50-lenny-with-apache-2</link>
		<comments>http://www.mogilowski.net/lang/en-us/2009/02/23/install-coldfusion-8-multiserver-on-debian-50-lenny-with-apache-2#comments</comments>
		<pubDate>Mon, 23 Feb 2009 10:51:03 +0000</pubDate>
		<dc:creator>sebastian</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[multiserver]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://www.mogilowski.net/?p=313</guid>
		<description><![CDATA[This article describes, how to install Adobe Coldfusion 8 with Multiserver configuration. You can use this configuration for an ISP like coldfusion setup. Each instance/virtual host will have its own Coldfusion administrator with custom settings. 1. Prerequirements: * Apache 2 is installed and running correctly. * libstdc++5 is installed. aptitude install libstdc++5 * You have [...]]]></description>
			<content:encoded><![CDATA[<p><span lang="en-us">This article describes, how to install Adobe Coldfusion 8 with Multiserver configuration. You can use this configuration for an ISP like coldfusion setup. Each instance/virtual host will have its own Coldfusion administrator with custom settings.</span></p>
<h3><span lang="en-us">1. Prerequirements:</span></h3>
<p><span lang="en-us">* Apache 2 is installed and running correctly.</span></p>
<p><span lang="en-us">* libstdc++5 is installed.</span></p>
<pre>aptitude install libstdc++5</pre>
<p><span lang="en-us">* You have a domain for your virtual hosts. (www.testsrv.local)</span></p>
<p><span lang="en-us">* You have downloaded the latest linux coldfusion installer from www.adobe.com (coldfusion-801-lin64.bin for example)</span></p>
<h3><span lang="en-us">2. Install coldfusion:</span></h3>
<pre>
chmod +x coldfusion-801-lin64.bin
./coldfusion-801-lin64.bin
</pre>
<p><span lang="en-us"><strong>Note:</strong> This is the 64-Bit installer. If you don&#8217;t have an 64-bit operating system, you need the 32-bit version (coldfusion-801-lin.bin).</span></p>
<p><span lang="en-us">Configuration settings:</span></p>
<pre>
CHOOSE LOCALE BY NUMBER: 1
PRESS &#60;ENTER&#62; TO CONTINUE: &#60;ENTER&#62;
PRESS &#60;ENTER&#62; TO CONTINUE: &#60;ENTER&#62;
...
DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N): Y
Installation Choice: 1 (Install new version of Adobe ColdFusion 8 with a serial number)
Serial Number: XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
Choose one of the following options:: 2 (Multiserver configuration)
Is there already a multiserver configuration of Adobe ColdFusion 8, or Macromedia JRun 4, installed?: 2 (No)
Select an option: 5 (Continue with installation)
Default Install Folder: /opt/jrun4 &#60;ENTER&#62;
PRESS &#60;ENTER&#62; TO CONTINUE: &#60;ENTER&#62;
PRESS &#60;ENTER&#62; TO CONTINUE: &#60;ENTER&#62;
...
DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N): Y
Serial Number:: &#60;ENTER&#62;
Earlier Versions of Adobe ColdFusion installed?
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS &#60;ENTER&#62; TO ACCEPT THE DEFAULT: 2 (No)
Configure Webserver: 1 (Add Web Server Configuration)
Select "Apache" 1
Directory: /etc/apache2
File: /usr/sbin/apache2
File: /etc/init.d/apache2
Choice: 4 (Continue with installation)
Directory: (DEFAULT: /etc/htdocs): /var/www
User Name: (DEFAULT: nobody): &#60;ENTER&#62;
Password: &#60;Default Development Password&#62;
Enable RDS  (Y/N): Y
Password: &#60;Your Password&#62;
PRESS &#60;ENTER&#62; TO CONTINUE: &#60;ENTER&#62;

Time for a cup of coffee ...

Press Enter to exit the installer: &#60;ENTER&#62;
</pre>
<h3><span lang="en-us">3. Create an init script:</span></h3>
<p><span lang="en-us">On Suse or Redhat you can use &#60;pre&#62;/opt/jrun4/bin/cf-init.sh install&#60;pre&#62; to create an init script but on Ubuntu or Debian you have to create your own script:</span></p>
<pre>vim /etc/init.d/coldfusion8multi</pre>
<pre>
#!/bin/sh
# MultiServer cfusion instance Init-Script

CF_DIR="/opt/jrun4"

cfstart() {
echo "The ColdFusion 8 server is starting up and will be available shortly."
nohup $CF_DIR/bin/jrun -start cfusion &#62; $CF_DIR/logs/cfusion-event.log &#38;
echo "======================================================================"
echo "ColdFusion 8 has been started."
echo "ColdFusion 8 will write logs to $CF_DIR/logs/cfusion-event.log"
echo "======================================================================"
}

cfstop() {
echo "Stopping ColdFusion 8, please wait"
nohup $CF_DIR/bin/jrun -stop cfusion
echo "ColdFusion 8 has been stopped"
}

case $1 in
    start)
        cfstart
    ;;
    stop)
        cfstop
    ;;
    restart)
        cfstop

    cfstart
    ;;
esac

exit 0
</pre>
<p><span lang="en-us">Install the init script:</span></p>
<pre>update-rc.d coldfusion8multi defaults</pre>
<p><span lang="en-us">Start the coldfusion server:</span></p>
<pre>/etc/init.d/coldfusion8multi start</pre>
<p><span lang="en-us">Setting up apache connector:</span></p>
<pre>/opt/jrun4/bin/cf-connectors.sh</pre>
<p><span lang="en-us">This will install and configurate the &#8220;mod_jrun22&#8243; for the apache webserver. (/etc/apache2/httpd.conf)</span></p>
<pre>
# JRun Settings
LoadModule jrun_module /opt/jrun4/lib/wsconfig/1/mod_jrun22.so
&#60;IfModule mod_jrun22.c&#62;
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore /opt/jrun4/lib/wsconfig/1/jrunserver.store
    JRunConfig Bootstrap 127.0.0.1:51020
    #JRunConfig Errorurl url &#60;optionally redirect to this URL on errors&#62;
    #JRunConfig ProxyRetryInterval 600 &#60;number of seconds to wait before trying to reconnect to unreachable clustered server&#62;
    #JRunConfig ConnectTimeout 15 &#60;number of seconds to wait on a socket connect to a jrun server&#62;
    #JRunConfig RecvTimeout 300 &#60;number of seconds to wait on a socket receive to a jrun server&#62;
    #JRunConfig SendTimeout 15 &#60;number of seconds to wait on a socket send to a jrun server&#62;
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
&#60;/IfModule&#62;
</pre>
<p><span lang="en-us">Restart the apache webserver:</span></p>
<pre>/etc/init.d/apache2 restart</pre>
<p><span lang="en-us">Now you can open the coldfusion administrator:</span></p>
<pre>http://&#60;SERVER&#62;/CFIDE/administrator/index.cfm</pre>
<p><span lang="en-us">Complete the installation in the coldfusion administrator.</span></p>
<h3><span lang="en-us">4. Configurate an new coldfusion instance and virtual host:</span></h3>
<p><span lang="en-us">First you have to create a new instance with the &#8220;Instance Manager&#8221;. Open the coldfusion administrator and select &#8220;Enterprise Manager&#8221; and choose &#8220;Instance Manager&#8221;. The next step is to select &#8220;Add New Instance&#8221; and enter a &#8220;Server Name&#8221; for your new cf instance &#8220;webapp1&#8243; for example and press &#8220;Submit&#8221;.</span></p>
<p><span lang="en-us">Jrun creates a new server directory &#8220;/opt/jrun4/servers/webapp1&#8243; and starts the instance. In the &#8220;Instance Manager&#8221; you can see the new instance and the HTTP-Port &#8220;8301&#8243; for example. Now you can access the coldfusion administrator of the instance with: &#8220;http://&#60;SERVER&#62;:8301/CFIDE/administrator/index.cfm&#8221;</span></p>
<p><span lang="en-us">The document root is in &#8220;/opt/jrun4/servers/webapp1/cfusion.ear/cfusion.war/&#8221;.</span></p>
<p><span lang="en-us">You can create a simple test file:</span></p>
<pre>vim /opt/jrun4/servers/webapp1/cfusion.ear/cfusion.war/test.cfm</pre>
<pre>
&#60;h2&#62;Test&#60;/h2&#62;
&#60;cfset test="Hello World"&#62;
&#60;cfoutput&#62;#test#&#60;/cfoutput&#62;
</pre>
<p><span lang="en-us">You can open the Test-script with &#8220;http://&#60;SERVER&#62;:8301/test.cfm&#8221;.</span></p>
<p><span lang="en-us">Now create a new virtual host &#8220;webapp1&#8243;.</span></p>
<pre>vim /etc/apache2/sites-available/webapp1</pre>
<pre>
&#60;VirtualHost *&#62;
    ServerName www.testsrv.local

    &#60;IfModule mod_jrun22.c&#62;
        JRunConfig Verbose false
        JRunConfig Apialloc false
        JRunConfig Ignoresuffixmap false
        JRunConfig Serverstore /opt/jrun4/lib/wsconfig/1/jrunserver.store
        JRunConfig Bootstrap 127.0.0.1:51000
        #JRunConfig Errorurl url &#60;optionally redirect to this URL on errors&#62;
        #JRunConfig ProxyRetryInterval 600 &#60;number of seconds to wait before trying to reconnect to unreachable clustered server&#62;
        #JRunConfig ConnectTimeout 15 &#60;number of seconds to wait on a socket connect to a jrun server&#62;
        #JRunConfig RecvTimeout 300 &#60;number of seconds to wait on a socket receive to a jrun server&#62;
        #JRunConfig SendTimeout 15 &#60;number of seconds to wait on a socket send to a jrun server&#62;
        AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
    &#60;/IfModule&#62;

    DocumentRoot /opt/jrun4/servers/webapp1/cfusion.ear/cfusion.war/
    &#60;Directory /opt/jrun4/servers/webapp1/cfusion.ear/cfusion.war/&#62;
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    &#60;/Directory&#62;

    ErrorLog /var/log/apache2/error.log
    CustomLog /var/log/apache2/access.log combined
&#60;/VirtualHost&#62;
</pre>
<p><span lang="en-us"><strong>Note:</strong> Very important is that line &#8220;JRunConfig Bootstrap 127.0.0.1:51000&#8243;. Foreach multiserver instance coldfusion creates an own port for the &#8220;JRunProxyService&#8221;. This port is defined in the &#8220;jrun.xml&#8221; of the instance.</span></p>
<pre>vim /opt/jrun4/servers/webapp1/SERVER-INF/jrun.xml</pre>
<pre>
...
&#60;service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService"&#62;
...
&#60;attribute name="port"&#62;51000&#60;/attribute&#62;
&#60;attribute name="deactivated"&#62;false&#60;/attribute&#62;
...
&#60;/service&#62;
...
</pre>
<p><span lang="en-us">Now install the new virtual host:</span></p>
<pre>a2ensite webapp1</pre>
<p><span lang="en-us">and reload the apache webserver:</span></p>
<pre>/etc/init.d/apache2 reload</pre>
<p><span lang="en-us">Now you can access your test script with &#8220;http://www.testsrv.local/test.cfm&#8221;.</span></p>
<p><span lang="en-us">And you can access the coldfusion administrator with &#8220;http://www.testsrv.local/CFIDE/administrator/index.cfm&#8221;.</span></p>
<p><span lang="en-us">You should do some extra configurations like restrict the access to CFIDE with an additional &#8220;.htaccess&#8221; file, restrict the directory listing and some other apache security settings.</span></p>
<h3><span lang="en-us">5. Modify init script:</span></h3>
<p><span lang="en-us">The coldfusion server does&#8217;t start the instance on startup. You have to add all instances to your init script. Here is an modified version for &#8220;webapp1&#8243;:</span></p>
<pre>
#!/bin/sh
# MultiServer cfusion instance Init-Script

CF_DIR="/opt/jrun4"

cfstart() {
echo "The ColdFusion 8 server is starting up and will be available shortly."
nohup $CF_DIR/bin/jrun -start cfusion &#62; $CF_DIR/logs/cfusion-event.log &#38;
nohup $CF_DIR/bin/jrun -start -childVM webapp1 &#62; $CF_DIR/servers/webapp1/cfusion.ear/cfusion.war/WEB-INF/cfusion/logs/cfusion-event.log &#38;
echo "======================================================================"
echo "ColdFusion 8 has been started."
echo "ColdFusion 8 will write logs to $CF_DIR/logs/cfusion-event.log"
echo "======================================================================"
}

cfstop() {
    echo "Stopping ColdFusion 8, please wait"
    nohup $CF_DIR/bin/jrun -stop cfusion
    nohup $CF_DIR/bin/jrun -stop -childVM webapp1
    echo "ColdFusion 8 has been stopped"
}

case $1 in
    start)
        cfstart
    ;;
    stop)
        cfstop
    ;;
    restart)
        cfstop
        sleep 20
        cfstart
    ;;
esac

exit 0
</pre>
<p><span lang="en-us"><strong>Note: </strong>You can create an own init script for each instance, too. You don&#8217;t need the main cfusion application to run the instances.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mogilowski.net/lang/en-us/2009/02/23/install-coldfusion-8-multiserver-on-debian-50-lenny-with-apache-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 19/30 queries in 0.018 seconds using apc
Object Caching 475/475 objects using apc

Served from: www.mogilowski.net @ 2012-05-22 17:52:35 -->
