May 2014

Gavin Pickin

Multi CFML Engine Install - Installing Railo on Linux - Centos

CFML Server, Server Admin

Some configuration to be aware of

I am going to install all of my Websites, Configuration, all in a Home directory of one user, to make it easier for permissions, backup, configuration.

So /home/www is going to be my User directory.
Settings will go under /home/www/_settings

You can obviously create your own conventions, but this is the basis for what I am doing.

First, lets download the file.

I'm assuming you are running 64 bit Centos, so we get the link from the website

I like to keep my files organized, so i'm going to
cd /home/www/_settings/downloads

It has a little extra fluff on their link, as it shows you a form through a browser, but wget is pretty slick, and its downloading away once it finds the right place for the file.

Setup Users before Installing

Like ColdFusion installs, when installing, you have to have a pre-existing User, so we'll go ahead and add them now, before starting the installation.
Add our users that railo will run under.... assuming we might want more than one instance, lets make users for each now.

useradd railoa
useradd railob
useradd railoc

Now, to make managing permissions easier, we'll create a group called webservices or cfmlservices or something that can belong to, and we'll give that group permissions to the /home/www folder. The following command makes that group the main group for each user.

usermod -a -G webservices railoa
usermod -a -G webservices railob
usermod -a -G webservices railoc

When adding a user, we also want to make sure we lock them down, so they can't SSH in, so lets edit the passwd file, and update their settings.

Nano /etc/passwd

Change the new user's /bin/bash to /sbin/nologin

Save and exit the file when you're done.
[ Enter ]

Running the Installation

We have downloaded the file, but before we can run it, we need to make the bin executable, so chmod to change permissions on the file, using +x to add x or execute permissions on the file... then we can run it.

chmod +x


Installation Screens

The following section is a step by step walk through of the screen. I'm going to enter my instructions in BOLD below each page, with a HR to make it easier to see.

Language Selection

Please select the installation language
[1] Simplified Chinese - ????
[2] Traditional Chinese - ????
[3] Dutch - Nederlands
[4] English - English
[5] French - Français
[6] German - Deutsch
[7] Italian - Italiano
[8] Polish - Polski
[9] Brazilian Portuguese - Português Brasileiro
[10] Romanian - Român?
[11] Spanish - Español
Please choose an option [4] :

I am assuming english.
Press 4 then [ Enter ]

Welcome to the Railo Installer.


Please read the following License Agreement. You must accept the terms of this
agreement before continuing with the installation.

Press [Enter] to continue :

Press [ Enter ] [ Enter ] and Y to agree to the terms.

Please specify the directory where Railo will be installed.

Installation Directory [/opt/railo]:

We are setting up multiple instances, so we're going to match location with instance name.
Opt seems to be the new place to install "external" applications, not installed with YUM etc, so we'll keep that convention. You might want to change the path slightly, so its not the same as everyone else, but this will work for this documentation

Tomcat Administrator Login

Tomcat includes a web interface that can be used to manage some aspects of your
Tomcat server. Please enter the username and password that you would like to use
to access that web based administrator.

Tomcat User: [admin]:

We're going to setup specific users for our instances, so instance name, railoa and then tomcatadmin, or something similar, again, change for security

Tomcat Password: :
Tomcat Password (confirm):  :

Enter and confirm your password, this will allow you to login to the Railo SERVER and WEB admin, so remember this.

Tomcat Ports

Tomcat needs to reserve "ports" on your computer in order to serve various types
of requests. You can customize those ports using the fields below. If you are
unsure, the default values provided below are perfectly safe to use.

Tomcat Web Server Port: [8888]:

We're going to setup our instances with certain ports? so lets use 8501 for a, 8502 for b etc? but you can use the default, just remember some system for numbering them all, including your CF, so you can get them all to talk to each other and not clash.

8501 [ Enter ]

Tomcat Shutdown Port: [8005]:

You can use the default, again, we're going to assign a port for each instance, so 8000 + the version
8001 for a, 8002 for b, etc 8009 for CF9, 8010 for CF10, 8011 for CF11.

Tomcat AJP Port: [8009]:

You can use the default, again, we're going to assign a port for each instance, so 8020 + the version
8021 for a, 8022 for b, etc 8029 for CF9, 8030 for CF10, 8031 for CF11.

Tomcat System User

Enter in the System User Account that Tomcat will run under. Running as "root"
or "Administrator" on Windows will avoid system permission problems, while
running as a non-root user will add an additional layer of security. If you
choose to run as a non-root user, we recommend using a easily identifiable
username like "railo" or "cfml".

We're using the user railoa railob etc for our instances. Added prior to installation.

Start At Boot?

Do you want Railo to start up automatically whenever the system boots up?

Yes, Start Railo at Boot Time [Y/n]:
We will say yes, because I quite like the railo script. After the install, we'll rename the file, so they don't overwrite each other as we install Railo B and Railo C

Install Apache Connector?

The Apache connector is needed for most installs. The only time it is not needed
is if you are not using Apache as your primary web server. If you're not sure
what to do here, please install the connector.

Install Apache Connector? [Y/n]:
We want to do the connector manually, so lets say N, and handle that ourselves later.

Choose Bit Type

Please verify the bit-type you're wanting to install. Are you running a 32-bit or a 64-bit OS?

Bit Type

[1] 32-bit: 32-bit
[2] 64-bit: 64-bit
Please choose an option [2] :

We assume you are running 64 bit, so lets press 2 and [ Enter ]

Setup is now ready to begin installing Railo on your computer.

Do you want to continue? [Y/n]:

Speak now, or forever hold your peace.
Y  [ Enter ]

Please wait while Setup installs Railo on your computer.

 0% ______________ 50% ______________ 100%
What the ascii art and wait patiently.

Setup has finished installing Railo on your computer.

Installing Java7

java -version
If you are running 1.6 or Java6, we'll install Java7

yum install java7
[ Enter ]

Next, lets look at the startup script.
cd /etc/rc.d/init.d

You should see a file created called railo_ctl.
Since we will have several instances, lets rename this file, so we can have one for a, b, and c.

Lets remove railo_ctl from chkconfig with
chkconfig --del railo_ctl

Rename the file to railoa_ctl
mv railo_ctl railoa_ctl

Lets add this script to chkconfig
chkconfig --add railoa_ctl

We'll set the script to be on at boot
chkconfig railoa_ctl on

Now, we can install the other instances.
Just remember to rename the scripts after the install? or you can copy paste (and modify the references inside the script) and select no on the installs.
Up to you.


Make sure your have the ports open? check your firewall, iptables etc.

Lets test the install
Railo A - http://[machinename]:8501/index.cfm
Railo B - http://[machinename]:8502/index.cfm
Railo C - http://[machinename]:8503/index.cfm

You should see the Railo Welcome page. It has some dumped info, and some great links.
Note: You will see images missing. The install seems to always have the images folder missing.

Now, lets make a more informative test file.

cd /opt/railoa/tomcat/webapps/ROOT
nano test.cfm

Add this to the file

<h1>Railo A</h1>
<cfdump var="#server#">
<cfdump var="#cgi#">

browse to http://[machinename]:8501/test.cfm it

Do the same for Railo B and C
This will be useful when we go to test our cluster? to see which instance of Railo is actually being shown.

Now, we have everything setup with Railo, now we can install ColdFusion engines, and then start configuring Apache, to be the Entry Point / Load Balance, managing the CFML Engine to handle the files, and load balance the cluster.



by Christoph Metzeld
05/21/2015 10:03:05 AM

I tried to use this article for my Centos 7 server, but somehow couldn't complete the installation. Luckily I stumbled upon an article that it is specific as it could be, so if any of the readers need it, here it is:

Blog Search