Install railo3.2 in cPanel Server

Posted: March 21, 2014 in cPanel

INSTALL RAILO 3.2

Railo 3.2 32bit

root@railo [~]# wget 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

Railo 3.2 64bit

root@railo [~]# wget http://www.getrailo.org/down.cfm?item=/railo/remote/download/3.2.1.000/tomcat/linux/railo-3.2.1.000-pl0-linux-x64-installer.run

Give executable permission to the bianry file.

root@railo [~]# chmod +x *.run

Execute the binary file to install railo

root@railo [~]# ./railo-*-installer.run

It is better to give the default settings while the installation.

CONFIGURE APACHE TO LOAD RAILO

1. Add an additional conf for railo’s mod_jk module in apache.
Open apache configuration file (httpd.conf) and add the following entry in it. Here in my case it is ‘/usr/local/apache/conf/httpd.conf’.

Include conf/mod_jk.conf

2. Add railo configuration entries.
Create a file, ‘/usr/local/apache/conf/mod_jk.conf’ with the following contents in it.

#############################################################

LoadModule jk_module /usr/lib/httpd/modules/mod_jk.so

JkMount /*.cfm ajp13
JkMount /*.cfc ajp13
JkMount /*.do ajp13
JkMount /*.jsp ajp13
JkMount /*.cfchart ajp13
JkMount /*.cfres ajp13
JkMount /*.cfm/* ajp13
JkMount /*.cfml/* ajp13
# Flex Gateway Mappings
# JkMount /flex2gateway/* ajp13
# JkMount /flashservices/gateway/* ajp13
# JkMount /messagebroker/* ajp13
JkMountCopy all
JkLogFile /var/log/httpd/mod_jk.log
###############################################################

3. You have to distill apache configuration.

root@railo [~]# /usr/local/cpanel/bin/apache_conf_distiller –update
root@railo [~]# /etc/init.d/httpd restart

Check if jk module is loaded with Apache. If it is enabled you will get a result like as follows.

root@railo [~]# httpd -M | grep jk
Syntax OK
jk_module (shared)

Once the installation completed, you can access railo administrator control panel using the following url.

http:///railo-context/admin/server.cfm

ENABLE RAILO FOR A CPANEL ACCOUNT

** Railo is enabling domain basis not account basis. You have to given the document root of your domain in the railo configuration to enable railo.

Here i am showing you how to enable railo for the domain, ‘my.in’. Document root of my.in is ‘/home/my/public_html’.

http://www.my.in
http://www.my.in/railo-context/admin/web.cfm
You can create a test cfm page using the following code. Save these contents in test.cfm file and copy it in the document root of the domain and access http://www.my.in/test.cfm.

#myVar#
adminz@adminz-X550CA:~$ cat t
Here i am showing you how to enable railo for the domain, ‘my.in’. Document root of my.in is ‘/home/my/public_html’.

Open /opt/railo/tomcat/conf/server.xml in your favourite editor like vim or nano and add the following code section in it. There will be a sample code in /opt/railo/tomcat/conf/server.xml. You can give the following code just below the sample code.

Make changes in the following code by your domain name and it’s document root.

http://www.my.in

Restart railo service once you have sone the above changes.

root@railo [~]# /etc/init.d/railo_ctl restart

Once you have restarted railo, check if the service is started or not. If there is any errors the service will ne be started and it will show ‘No PID found’ while checking the railo status.

root@railo [~]# /etc/init.d/railo_ctl status
* Railo/Tomcat is running (PID: 1979)

If the PID of railo is not running even after restarting railo, you have to check railo log to sort out the issue.
The following log wil help to find the issue.

root@railo [~]# tail -f /opt/railo/tomcat/logs/catalina.out

It will take time to completly UP the railo service, depending upon the number of sites added in server.xml it will vary.
Once you have done the above steps, the following url will be available for you.

http://www.my.in/railo-context/admin/web.cfm

You can create a test cfm page using the following code. Save these contents in test.cfm file and copy it in the document root of the domain and access http://www.my.in/test.cfm.

Test CFM Page

#myVar#
#Now()#

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s