Thursday, March 17, 2016

Install Railo on Oracle Linux 7

Railo is an open source software that allows you to run cfml (ColdFusion) applications. Railo allows you to use the features you use when developing cold fusion applications without running the Adobe ColdFusion Server. There are multiple reasons you may use Railo, two common reasons are reduced licensing costs and open source support. Railo was reversed engineered from the existing Cfml language so almost all mark up language avaiable in cfml run on Adobe CF is available on Railo.

Install Oracle Linux 7 or comparable linux.
Standard Post Linux Install Steps.

Download Railo (Current Version

Tools Required:
sftp client – Recommended Fillezilla
ssh client – Recommended SecureCrt($99 per year), Optional Putty (Free)

1. Create a directory to stage the railo software
As the root user create a location to store the software files
sudo su – root
mkdir /home/stage
chmod 777 /home/stage
2. Secure ftp the files to the server
Move the railo file downloaded to the /home/stage directory
3. Grant execute privileges on railo executeable
cd /home/stage
chmod 777
4. Install apache http server
sudo su - root
yum install mod_ssl openssl httpd -y
5. Install mod_perl – mod_perl does not come with the lastest release of Linux
cd /home/stage
yum install wget -y
yum install epel-release-7-5.noarch.rpm -y
yum install mod_perl -y
6. Configure apache to autostart
systemctl enable httpd.service
systemctl start  httpd.service
systemctl -l | grep httpd
7. Install railo
cd /home/stage
sudo ./
4 - English
Enter,Enter License Agreement, y
Install Dir: /opt/railo
Password: <password>
Tomcat Server Port: 8888
Tomcat Shutdown Port: 8005
Tomcat AJP: 8009
System User: cfml
Start Railo Boot: Y
Install Apache Connector: Y
Apachectl: /usr/sbin/apachectl
http Modules: /usr/lib64/httpd/modules
apache config: /etc/httpd/conf/httpd.conf
Apache logs: /var/log/httpd
Install: Y
8. Create users, groups and directories for apps
useradd webapps
mkdir /home/webapps/public_html/WEB-INF -p
sudo chmod 755 /home/webapps
sudo chmod 755 /home/webapps/public_html
sudo chown cfml:cfml /home/webapps/public_html/WEB-INF/
gpasswd -a cfml webapps
gpasswd -a webapps cfml
9. Configure apache
vi /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
  ServerAdmin <AdminEmail>
  DocumentRoot /home/webapps/public_html/
  ServerName <ServerName>
10. Configure tomcat to allow access
Search for the hosts section in the server file and add a host entry for your app directory and your admin app
cd /opt/railo/tomcat/config
vi server.xml
<Host name="<ServerName>" appBase="webapps">
  <Context path="" docBase="/home/webapps/public_html/WEB-INF/" />
<Host name="<AdminServerName>" appBase="webapps">
  <Context path="" docBase="/opt/railo/tomcat/webapps/ROOT/" />
11. Restart railo and restart apache
service railo_ctl restart
systemctl restart httpd.service

Verifying Set Up
1. Set hostnames on local machine
Open Notepad as “Run as Administrator”
cd c:\windows\system32\drivers\etc
Edit hosts file
add to entries
<ip> <AppDomain>
<ip> <AdminDomain>
2. Check Apache
3. Check Railo/tomcat
4. Check Railo Server Admin and Web Admin pages
5. Create a cfml test page
cd /home/webapps/public_html/WEB-INF
vi test.cfm
<title>Testing your CF MX Application Server</title>
Today's Date: <CFOUTPUT>#DateFormat(Now(),"dddd, m/d/yy")#</CFOUTPUT>
6. Test your test page

No comments:

Post a Comment