How to install Railo on a CentOS 7 VPS
In this tutorial, we will show how to install Railo on a CentOS VPS. Railo is an open source software written in Java that implements CFML (ColdFusion Markup Language). Railo has an incredibly fast and powerful CFML engine which allows developers to create and deploy complex web applications with the greatest of ease. Railo web application server has a lot of services like session management, database connectivity, search engine, mail, scheduling, support for REST, XML, JSON etc. which will make easier the development of your web apps. The newest version of Railo comes with a plenty of new and extended functions and tags, such as QueryExecute, QueryRowData, isEmpty, getCanonicalPath, support for GZip Compression etc.
At the time of writing this tutorial, the latest stable version of Railo web application server is 4.2 and it requires Apache Web Server 2.0 later. This install guide assumes that Apache is already installed and configured on your Railo virtual server.
Download the latest version of Railo available at http://www.getrailo.org/index.cfm/download/ to the ‘/opt’ directory on the server:
cd /opt wget -O railo-4.2.1.008-pl0-linux-x64-installer.run http://www.getrailo.org/down.cfm?item=/railo/remote/download42/4.2.1.008/tomcat/linux/railo-4.2.1.008-pl0-linux-x64-installer.run&thankyou=true
The Installer creates a stand-alone instance of Railo server, Tomcat, and Java runtime environment specifically for use with Railo. To add an additional layer of security, it is a good idea to create a separate system user which will run the Tomcat server:
useradd -r railo --shell /bin/false
Make the installer file executable and run it:
chmod 755 railo-4.2.1.008-pl0-linux-x64-installer.run ./railo-4.2.1.008-pl0-linux-x64-installer.run --mode text
Then, follow the easy instructions: select the installation language, specify the directory where Railo server will be installed, set the Railo administrator and web administrator password, specify the Tomcat web server port (e.g. 8080), enter the system user account that Tomcat will run under (e.g. railo), choose Railo server to start up automatically whenever the system boots up and set it to install the Apache connector, then wait a couple of minutes while setup installs Railo on your virtual server.
Once you receive a message that the installer has finished installing Railo on your server, edit the ‘/opt/railo/tomcat/bin/setenv.sh’ file and modify the initial Java heap size, maximum Java heap size and the Java PermGen size:
JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxPermSize=128m -javaagent:lib/railo-inst.jar";
JAVA_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=256m -javaagent:lib/railo-inst.jar";
Depending on the nature of your application and its usage, you may need to change these settings and add some additional JVM arguments accordingly.
Open http://your-server-IP:8080 in your favorite web browser and you should see the Railo welcome screen:
The default Railo server administrator page is available at http://your-server-IP:8080/railo-context/admin/server.cfm and the default Railo web administrator page is available at http://your-server-IP:8080/railo-context/admin/web.cfm .
That is it. The Railo server installation is now complete. You should now check out the wiki documentation on how to add new sites to your new Railo installation.
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Railo for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.