919 - 926 - 9847

FarCry 5.2 + Railo 3.1.0.16 + Resin + Apache + MySQL + CentOS - Part 3

In this installment we're going to be installing FarCry, and tweaking our Apache settings a bit. To let ya'll know upfront, there's still a few issues with FarCry and functions that are named the same as internal Railo functions. I know these changes were placed into trunk at one point, but it doesn't seem like they migrated over to the 5.1.6 release. That's OK, I've got a fairly stable pull of the core trunk files from a few weeks back that I'll be linking on the site this evening. I'll verify that this fixes the odd "function cannot be named" stuff going on. The current trunk files are not allowing the overview page to come up, but then again this is trunk we're talking about... life on the bleeding edge sometimes leads to a paper cut ;).

  • Let's start by updating Railo, first browse to http://<vmware_IP>/railo-context/admin/server.cfm.
  • Set a new password as prompted.
  • Go to services -> Update in the left hand navigation.
  • Use http://preview.getrailo.org as the update site, and click Update.
  • Once it's brought the update down (you should see a bunch of info about what's in this update) click Execute Update.
  • Log back in, and you should see we're at .016 (at least until it becomes the latest stable release)!
  • Bring up a terminal and grab the latest FarCry community build.
  • wget http://org.farcrycore.s3.amazonaws.com/release/farcry-community-5-1-6.zip
  • You can replace the core folder from http://svn9.cvsdude.com/modius/farcry/core/trunk for the lastest bleeding edge. NOTE: The installer is broken in farcry core trunk, use the community build to install from, and replace the core later if you want to be at the bleeding edge. Or... just wait for 5.2 to leave beta status.
  • Navigate to the Railo webapps ROOT directory and expand the zip file. We'll also remove the index.cfm that's the default Railo test template.
  • cd /opt/railo/webapps/ROOT
    unzip ~/farcry-community-5-1-6.zip
    rm index.cfm from ROOT
  • log into phpmyadmin and create a new database (and, optionally, a user). User information is found under the privileges link. The "databases" link is where you can create a new database. Be sure to grant privileges to the user you plan to connect the datasource with. If you just stick with the root user, it should already have access. If you created a new user, you'll need to grant all of this from the privileges screen. You WILL need drop/create and all that jazz... the CMS creates tables for you and manages them.
  • Log into your Railo admin, http:/<vmware_IP>/railo-context/admin/index.cfm, and choose the server administrator. In our case, since we won't have seperate instances, it shouldn't really matter which you choose.
  • Go to Services -> Datasource and create a new datasource to the database we just created. Names are not important here, just ensure you choose the correct SQL server type! If you plan to insert large amounts of text into the body of an object (think a 10 page word document), go ahead an enable CLOBs. Otherwise, I've found the defaults work fine for me.
  • At this point, why don't we add the index.cfm (and other) type to our default page templates. Edit your httpd.conf file and add some file types. We'll also reboot Apache afterwords You can add the text at the end of the file. Find the second line in the code field and comment it out... our add to it, which ever. If you add to it, you won't need the ifmodule call..
    vi /etc/httpd/conf/httpd.conf
    DirectoryIndex index.html index.html.var
    <IfModule dir_module>
    DirectoryIndex index.html index.shtml index.wml index.pwml index.php index.php3 index.php4 index.php5 index.cfm
    </IfModule>
    /etc/init.d/httpd restart
  • Time to create our virtual host! Set the default directory to match our webapps directory for Railo. Again, not really a good practice for production, but a time saver for me and this example ;).
  • NameVirtualHost *:80
    <VirtualHost *:80>
    ServerAdmin webmaster@localhost.com
    DocumentRoot /opt/railo/webapps/ROOT
    ServerName railo.geodesic.com
    <Directory "/opt/railo/webapps/ROOT">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    ErrorLog logs/railo-error_log
    CustomLog logs/railo-access_log common
    </VirtualHost>
  • We'll need to make a slight adjustment to /opt/railo/webapps/ROOT/farcry/core/webtop/install/installFarcry.cfm. Look for a DUMP function, and comment it out. This should be fixed, at least it's fixed elsewhere, but sneaked its way back in here at some point...
  • We're getting closer, you should now be able to visit http://<vmware_IP>/farcry and see a message that your IP is not allowed to run the installer. That's OK, and is desirable behavoir. Simply edit /opt/railo/webapps/ROOT/farcry/core/webtop/install/Application.cfm and edit the allowed hosts at the top of the file to match your IP address. Hit the /farcry link again, and you should now be able to create a new project. Click the link in the main browser window as instructed.
  • Step 1. Fill out all of the feilds, but do not click the database only checkbox. Once completed, click Next. The fields are:
    • Project Name: <whatever you want to call it>
    • Project Folder Name: <usually, the same as the project>
    • Locales: <pick your language... however, be mindful that the English language seems to be the most supported>
    • Update Application Key: <secret key to supply when updating the application scope if NOT logged in. Can be aplha or numeric combos>
    • Adminstrator Password: <default password for the farcry user>
  • Step 2. We need to choose the datasource and database type. These fields are fairly self explanatory, so click Next once they've been filled in.
  • Step 3. Choose your skeleton. Again, there's some nice detail in the installer, and your only choice should be Mollio. Click Next to continue.
  • Step 4. Leave the default plugins in place... this isn't really the arena to deal with what these are. A good source of information is the farcrycms.org and google groups for more detailed information about plugins. Click Next to continue.
  • Step 5. Choose a Standalone install. One of the nice additions to the 5.x branch was a much more user friendly way to add a FarCry install to a shared host. The standalone install means that you expact the root of your site (http://<vmware_IP>/) to serve all it's pages through the CMS. It also means each website you create has it's own FarCry core. Click Next to continue.
  • Step 6. Verify the options, and click INSTALL NOW to carry on.
  • Step7. Profit!

It should, in theory, install correctly and give you the links to login and to just visit the site. For future reference, /farcry/core/webtop/login.cfm will take you to the administrator page. You'll likely want to turn off debugging in the railo administrator (web admin may be best for this) to speed up execution times. Have a play about to ensure all the features you want work, and you can always post to the google groups should things go south. Next up on the docket is attempting to work friendly URLs into the mix, and possibly teaking the JVM settings for some better performance.

Note: Some of the functions that I thought were removed, are still showing up in the community release for some reason. I have a core download that was working on Ubuntu that I'm going to upload for those to download here to replace their current core. The site tree will not work until this is done, or you find the offending functions and delete them. That file resides on a machine in my house which I won't have access to until later this evening.

NOTE: Please see the addendum for information about what's not working.

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