Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

How To Install Railo 3.2 Under OpenSUSE 11.3 Running Apache2 Tomcat 6 Virtual Host


Railo Server 3.2 Final. (3.2.1.000) has been released. As you know Railo is an Open Source ColdFusion Markup Language (CFML) engine. It is free and pretty fast.

For the new 3.2 version railo stop running resin, but tomcat as the default web server. Instead of compile apache2 with tomcat 6 by yourself, the railo team had created the default installation script which help you setup railo on tomcat6 and using apache2 to connect to tomcat via mod_jk.

Instead of using tomcat default webapps directory, we will modify the server.xml file and DocumentRoot will point back to default apache DocumentRoot directory defined under the virtual host configuration file.

The server is running OpenSUSE 11.3 (i386) on vmware player, and we need apache2 and Java installed before you run tomcat/railo service.

step 1. install java
step 2. install apache2
step 3. install railo/tomcat
step 4. integrate apache/tomcat/railo into named based virtual host
step 5. test

I do not guarantee the following works for you. (wintel2006@hotmail.com)

 

1. Install java

cd /usr/local

bash jdk-6u21-linux-i586.bin

After installation, add the following 2 lines to /etc/profile:

export JAVA_HOME=/usr/local/jdk1.6.0_21
export PATH=$PATH:/usr/local/jdk1.6.0_21/bin

And then save the file, run

source /etc/profile

to update system environment variables.

 

2. Install Apache2 And Make Package

zypper install apache2

1

3. Download Latest Railo 3.2 Package

Download latest railo 3.2 package from www.getrailo.org website into /tmp directory, and change it to executable (railo server with tomcat 6.0.29 for linux with *nix 32bit (run 97 MB)).

http://www.getrailo.org/down.cfm?item=/railo/remote/download/3.2.1.000/tomcat/linux/railo-3.2.1.000-pl0-linux-installer.run

chmod +x /tmp/railo-3.2.1.000-pl0-linux-installer.run

2

3.1 Install Railo

/tmp/railo-3.2.1.000-pl0-linux-installer.run

Click OK to go to the next page:

3

Click “Forward” to continue:

4

Accept the default installation directory and click “Forward”:

5

Accept the default tomcat administrator username, and click “Forward”:

6

Select a secret password you remember, and click “Forward”:

7

Accept the default tomcat system user “root”, and click “Forward”:

8

Accept default value and run railo at boot time, then click “Forward”:

9

Accept default value and install apache connector:

10

The final step isto choose the correct apache version, then click “Forward”:

11

For the SUSE apache webserver, the default apache control script is under “/etc/init.d/apache2”:

12

For the SUSE apache webserver, the default apache configuration file is under “/etc/apache2/httpd.conf”:

14

Accept the default value, and click “Forward”:

15

Click “Forward” and continue:

16

17

18

Now open a browser and you will see railo is running and starts serving any coldfusion requests. (Be aware that the default installation only works for localhost, and for any cfm requests the DocumentRoot is under /opt/railo/tomcat/webapps/ROOT/, NOT apache default DocumentRoot /srv/www/htdocs) , we will work on real virtual host next step.

19

Railo admin page:

20

4. Name Based Virtual Host Configuration In Apache And Tomcat

Suppose I am running name based virtual host (www.example.com) under apache, and the default DocumentRoot is /srv/www/htdocs.

The virtual host configure file is under /etc/apache2/vhosts.d/internal.conf:

<VirtualHost *:80 >
       ServerAdmin webmaster@example.com
       DocumentRoot /srv/www/htdocs
       ServerName www.example.com
       FileETag INode Size
       ErrorLog /srv/www/htdocs/www.example.com-error_log
       CustomLog /srv/www/htdocs/www.example.com-access_log combined
   </VirtualHost>
21

To make railo work under the virtual host www.example.com, we need one more step:

Please change to /opt/railo directory to modify the tomcat configure file server.xml so that the default apache web server root is /srv/www/htdocs, instead of the default tomcat webapps directory.

cd /opt/railo

vi tomcat/conf/server.xml

Around line 143 add the following section:

        <Host name="www.example.com" appBase="webapps"
             unpackWARs="true" autoDeploy="true"
             xmlValidation="false" xmlNamespaceAware="false">
             <Context path="" docBase="/srv/www/htdocs" />
                <Logger className="org.apache.catalina.logger.FileLogger"/>
        </Host>
22

Make sure name matches ServerName, and docBase matches DocumentRoot in the apache virtual host configuration file: internal.conf.

Finally, restart railo and apache2, and test whether virtual host works for railo:

/opt/railo/railo_ctl restart

And then create a coldfusion file under /srv/www/htdocs with the following command:

echo “<cfoutput>#now()#</cfoutput>” > /srv/www/htdocs/index.cfm

23

5. Now Launch Your Browser And Everything Should Work Now

24

25

Bingo, it works…




Comments

comments