919 - 926 - 9847

FarCry 5.2 + Railo + Resin + Apache + MySQL + CentOS - Part 1

Woah... not such a catchy title, but it's descriptive, non?

This all began as a quest to be able to provide a VPS solution to the lowest bidder situation. Their host provides CentOS machines at a fairly reasonable price, but that price would not include the cost of a ColdFusion license. My framework of choice is FarCry, and lately the Daemonites have taken great strides in keeping the framework compatible with Railo. This is the thorny path towards creating a Linux virtual machine with FarCry, MySQL, Railo, and Apache (oh... and SES URLs).

We'll start by just getting the basics of the system running and in place.

  • Everything I'm doing is as the root user... yes, not cool, but this just development. Typically, you should really use sudo to do all of this.
  • Grab a VMware image of CentOS 5.2. You can find one here: http://www.vmware.com/appliances/directory/1309. VMplayer can be found here: http://www.vmware.com/download/player/
  • Turn off IPTABLES for testing... yes, not the best idea for production, but this is development. I could not figure out why the heck Apache wasn't serving pages outside the local install, and it was the firewall blocking it. In production, you should really turn this feature on. I'm not addressing how to do so for this excercise.

    • /etc/init.d/iptables save
      /etc/init.d/iptables stop
  • Enable RPMforge packages. This will allow us to install phpMyAdmin through yum.
    • http://wiki.centos.org/AdditionalResources/Repositories/RPMForge (source)
    • Download either i386 or _64 RPM dependant on your OS type version
      • http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
      • http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
    • Import GPG key
      rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
    • Install it (replace the RPM with the name)
      rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm
  • We need to install apache (well, not NEED, but we're not using Tomcat here)
    • http://www.railo.ch/blog/index.cfm/2008/11/12/Installing-ResinRailo-on-CentOS (source)
    • yum install httpd httpd-devel openssl-devel
  • We need to install MySQL
    • http://www.ozzu.com/unix-linux-forum/centos-and-apache-php-mysql-t69484.html (source)
    • vi /etc/yum.repos.d/CentOS-Base.repo
    • change enable=1 for centosplus
    • yum install mysql-server mysql
  • I installed PHP/PHPmyadmin - just for DB administration
      yum install php php-mysql phpmyadmin
      cd /usr/share/phpmyadmin/
      vi config.inc.php
    • enter a value in $cfg['blowfish_secret'] = '<something>';
    • vi /etc/httpd/conf.d/phpmyadmin.conf
    • change the allow line to (yes, yes... but this is a test environ) to Allow from all
  • We need to install a JVM... this part just sucks. Unlike other distros, no precompiled version really meets our needs.
    • http://j2eeinaction.blogspot.com/2009/02/install-java-6-on-centos-52.html (source)
    • Go to http://java.sun.com/javase/downloads/index.jsp (grab the JDK!). You can browse to a download link and post that into your VM as something like the following
    • wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u14-linux-x64-rpm.bin?BundledLineItemUUID=CXFIBe.pePAAAAEioR0Hk1t8&OrderID=CgtIBe.pcWUAAAEilh0Hk1t8&ProductID=tPxIBe.oz2IAAAEhmh0zLjfT&FileName=/jdk-6u14-linux-x64-rpm.bin
    • rename that long ugly file to jdk.rpm.bin
    • mv <stupid long name> jdk.rpm.bin
    • chmod 700 jdk.rpm.bin
      /usr/sbin/alternatives --config java
  • Start Apache and MySQL at reboot
      /sbin/chkconfig httpd --level 2345 on
      /sbin/chkconfig mysqld --level 2345 on

And that's it. You have Apache serving pages at http://yoursite/ and phpMyAdmin at http://yoursite/phpmyadmin. Next up on the chopping block, adding Railo into the mix.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)