Thursday, December 27, 2012

Installing OpenFire on a Mac OSX 10.6 Snow Leopard



Installed OpenFire is a real time collaboration (RTC) server on Mac OS X 10.6 Snow Leopard


Create a new user for OpenFire database, instead of using root in mySQL database on Mac OS X 10.6 Snow Leopard.

Download the tar.gz and unzip the latest JDBC driver for mySQL from http://www.mysql.com/downloads/connector/j/

To Installation JDBC driver in Mac OSX 10.6 Snow Leopard:
Copy the file mysql-connector-java-5.1.22-bin.jar to the directory /Library/Java/Extensions/


Login to mysql (if you don't have set a password for database-root account yet, forgot about the "-p" parameter)

shell> mysql -p -u root

create a new database 'openfire':
mysql> CREATE DATABASE openfire;

create a new user 'openfirexxx':
mysql> CREATE USER 'openfirexxx'@'localhost' IDENTIFIED BY 'your-new-password';

Remove permissions if users already exists:
mysql> REVOKE ALL ON *.* FROM openfire;
ERROR 1141 (42000): There is no such gran defined for user 'openfirexxx' on host '%' | this is a good error

Give user 'openfirexxx' only rights for table 'openfire' and important using any IP connection ->@'%'
mysql> GRANT ALL PRIVILGES ON openfire.* TO openfirexxx @'%' WITH GRANT OPTION; 

logout
mysql> exit

import OpenFire mySQL database schema on Mac OS X:
shell> cat /usr/local/openfire/resources/database/openfire_mysql.sql | /usr/local/mysql/bin/mysql -p openfire;

Following  OpenFire installation screens and when you get to page localhost:9090/setup/setup-profile-settings.jsp
I got the following error:

HTTP ERROR 500

Problem accessing /setup/setup-profile-settings.jsp. Reason:

java.lang.NullPointerException
 at org.jivesoftware.openfire.admin.setup.setup_002dprofile_002dsettings_jsp._jspService(setup_002dprofile_002dsettings_jsp.java:80)

Trying the following fix: 

On ANY Mac w/ a 64-bit processor, you need to go into Applications --> Utilities --> Java Preferences and once you open the utility console you need to move the 32-bit version to the top of the priority list.

Reboot your machine! This solved the above error.

The errors continued.....

Could not find error.log, warn.log, etc and and Java Error on port 5229 - 

List of All ports on Mac
http://support.apple.com/kb/TS1629

Port 5229 is free?

So I just created the the logs required error.log, warn.log, info.log and debug.log and change permissions for this file to be writable by current user. 

Changed permission on 
/usr/local/openfire/bin/extra/openfire-launchd-wrapper.sh  to start and stop correctly from non-root account.

One last gotcha, log-in using admin instead of the your email id for admin user!!!!! 

Success ! Server is now working! 

Command line start / stopping of OpenFire

To start service:
sudo launchctl load /Library/LaunchDaemons/org.jivesoftware.openfire.plist


To stop service:
sudo launchctl unload /Library/LaunchDaemons/org.jivesoftware.openfire.plist


Spark Issues
Spark on top of this and make sure to install the plugin for "Search" on the server so you can find other users! http://community.igniterealtime.org/thread/47523


Firewall Ports for IM Client (using Spark) check your firewall: 
1) admin console that runs on port 9090
2) openfire im client must reach im traffic on port 5222
3) port 7777, for file transfers; these are the defaults.
re : http://www.openlogic.com/wazi/bid/188135/Instant-Messaging-in-the-Enterprise-with-Openfire










Tuesday, December 25, 2012

Google Web History - Turning it Off



Pause your "Search" Web History

If you're visiting a webpage or performing a search in Google Chrome and online at Google.ca./com your search are stored online by default at google.com/history.
If you don't want stored in your web history online:




2.Click Pause to prevent your future web activity from being saved in Web History and from being used to personalize your search results. To start keeping track of your web activity again, click Resume.

3.There is an option to Remove All Web History - what residuals remain is uncertain.

If you'd like to sign out of Web History altogether, click your name or email address at the top of the page, then select Sign out from the drop-down menu. Note that you'll need to sign back in to your Google Account in order for Web History to begin storing your web activity again.


Turn off Personal Results

Personal results are pages shared with you by your friends, Google+ posts from people you know, and content that's only visible to you (like private photos from Google+  and Picasa  albums). Personal results are part of Search plus Your World.

You can see what your results look like without personal content by clicking the  globe button on the top right-hand side of your search results page. This setting is session-specific, meaning that if you close your browser, personal results may appear next time you search. You can switch back to seeing personal results by clicking the  personal results button.

You can turn off personal results in your search settings . This action is account-specific, meaning that personal results will remain disabled as long as you're signed in to your Google Account.

·  Click the  gear in the top right corner of the search results page.
·  Click Search settings.
·  In the "Search plus Your World" section, select "Do not use personal results."

If you turn off personal results and stay signed in to your Google Account, you won't see results personalized based on your Google+ circles (or suggested connections), Google products, or your search history.


If you turn off personal results and sign out of your Google Account, you may still see personalized results and results based on the context of your search.

Friday, November 23, 2012

Leak Finder for JavaScript

Leak Finder: a new tool for JavaScript

Wednesday, August 8, 2012

Leak finder for JavaScript helps web application developers find memory leaks in their JavaScript programs.

In garbage-collected languages, such as JavaScript, you cannot have traditional memory leaks by forgetting to free memory: when all references to an object are dropped, the object is garbage-collected and the memory is freed.

However, JavaScript programs can leak memory by unintentionally retaining references to objects. For example the references can be pointers to objects stored in a data structure in a JavaScript library (e.g., Closure) instead of the application code. If an object is unintentionally retained, all objects it points to are kept alive as well. This will lead to superfluous memory consumption.


https://code.google.com/p/leak-finder-for-javascript/

Friday, October 19, 2012

Sharepoint Install Reset IE Settings - "Your current security settings do not allow this file to be downloaded"


Installed SharePoint Foundation Server and it Reset IE Security Settings.


After install I get "Your current security settings do not allow this file to be downloaded".











Annoyingly, resolving this error relies on 2 Internet Explorer settings.


Resolution: 

1) Open Internet Explorer -> click on tools -> click on internet options-> click on security -> click on custom level 






















2)  Scroll down till you get to downloads in the security section: 

     
Enable "File download" (Obviously, you think this would do it, but not.) 


















3)  Scroll until you reach "Launch applications and unsafe files." This is the gotcha moment, and rather oblique setting.

Enable "Launch applications and unsafe files". Select Prompt.








Now, this should do it. 

Saturday, September 22, 2012

How to Re-install Expression Web 4


Re-install Expression Web 4


Could not find this command so it's here for the zeitgeist!

"C:\Program Files (x86)\Microsoft Expression\Web 4\XSetup.exe" -r -AppLangId:1033 "-manifest:WebManifest.cab" "
-source:C:\Program Files (x86)\Microsoft Expression\Web 4\Setup\;g:\6cf48c91055c9ced0efc944087\Setup"

Thursday, May 24, 2012

TinyMCE Editor Implementation Plus








Just finished after many hours of creating a spacer button (icon) for theme : "advanced", which shows all buttons (icons).

With some JQuery magic you can accomplish this. Here's the pseudo code:

  1. Remove all the necessary classes and add a new class for the tags that contain the image for you spacer (transparent) gif with specific width and height of your choosing. And remember to deactivate the spacer button.
  2. I used this to right align my company logo for contact information
  3. theme_advanced_buttons5 : removeformat, iespell, spacer, mycompanylogo


I can now say that I can support or implement the awesome TinyMCE Editor! For services contact me.

Tuesday, May 22, 2012

How to Disable / Stop RSS Feeds in WordPress - SEO Friendly Way




How to Disable / Stop RSS Feeds in WordPress
 


Anyone who uses Wordpress may want to stop RSS feeds to stop spammers and scammers.  The common approach is the following function added to functions.php : 

function fb_disable_feed() { 
  wp_die( __(‘No feed available,please visit our homepage!’) );
}
add_action(‘do_feed’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rdf’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss2, ‘fb_disable_feed’, 1);
add_action(‘do_feed_atom’, ‘fb_disable_feed’, 1);

What's wrong this function?
Well, it returns a HTTP Status code of 500. 

500 (Internal server error)The server encountered an error and can't fulfill the request.


Not terribly SEO friendly. Too many 500 errors call into question the reliability of that site. Google doesn’t want to send users to a site that ultimately times out and doesn’t load.

This is a better written code snippet and will redirect to homepage.


// Remove feed links from the header
add_action( 'wp_head', 'custom_remove_feed_links', 1 );
function custom_remove_feed_links() {
// Remove feed links from the header
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
}

// Redirect all feed requests to the homepage
foreach ( array( 'rdf', 'rss', 'rss2', 'atom' ) as $feed ) {
add_action( 'do_feed_' . $feed, 'custom_redirect_feeds', 1 );
}
unset( $feed );
function custom_redirect_feeds() {
wp_redirect( home_url(), 302 );
exit();
}

// Delete feed rules
add_action( 'init', 'custom_kill_feed_endpoint', 99 );
function custom_kill_feed_endpoint() {
global $wp_rewrite;
$wp_rewrite->feeds = array();
flush_rewrite_rules(); // Delete this line after running once
}

Friday, May 11, 2012

Wordpress Links - Update Date and Sort by Date



Wordpress Links Date Extension


Solution Delivered : To be able to sort by date and update this date field for Wordpress 3.1+.

Specifically, 
wp_insert_link(...,link_updated ) never worked and core never intended this.


Contact me, for this and other Wordpress solutions.

Thursday, May 10, 2012

Install software list from command line - windows


Software installed with MSI

For all software installed with any installer, registry level script here.

Now use if link dead
forderud/MsiQuery: Tools for querying MSI files and installed Windows apps (github.com)

Use to run cscript.exe somescript.vbs

Output Types: HTML, CSV, and XML
Just use /format:hform.xsl, /format:csv.xsl,  /translate:basicxml /format:rawxml.xsl to select your desired output.(use the trnaslate with xml, changes the >'s and <'s to meaningful characters in xml, otherwise just use /format:rawxml.xsl)

CSV output: (there are more headings available for each of these path's, these are examples. For full headers, type /? after "get" to recieve a full list.)

For Example:
wmic:root\cli>product get /?

Property get operations.
USAGE:

GET [] []
NOTE:  ::=  | ,

The following properties are available:
Property                                Type                    Operation
========                                ====                    =========
Description                             N/A                     N/A
IdentifyingNumber                       N/A                     N/A
InstallDate                             N/A                     N/A
InstallLocation                         N/A                     N/A
InstallState                            N/A                     N/A
Name                                    N/A                     N/A
PackageCache                            N/A                     N/A
SKUNumber                               N/A                     N/A
Vendor                                  N/A                     N/A
Version                                 N/A                     N/A

The following GET switches are available:

/VALUE                       - Return value.
/ALL(default)                - Return the data and metadata for the attribute.
/TRANSLATE:      - Translate output via values from

.
/EVERY: [/REPEAT:] - Returns value every (X interval) seconds, If /REPEAT specified the command is executed  times.
/FORMAT:   - Keyword/XSL filename to process the XML results.

NOTE: Order of /TRANSLATE and /FORMAT switches influences the appearance of output.
Case1: If /TRANSLATE precedes /FORMAT, then translation of results will be followed by formatting.
Case2: If /TRANSLATE succeeds /FORMAT, then translation of the formatted results will be done.

===INSTALLED SOFTWARE:===

wmic product get Name, Version, Vendor, Description, PackageCache, IdentifyingNumber,  InstallLocation, InstallState,SKUNumber /format:htable >MSIInstalledSoftware.html

wmic product get Name, Version, Vendor, Description, PackageCache, IdentifyingNumber,  InstallLocation, InstallState,SKUNumber /format:csv >MSIInstalledSoftware.csv

Aside remove c:\ in all cases below (not writable characater)
===BIOS:===
wmic /output:C:\Bios.csv BIOS get Name, SMBIOSBIOSVersion, SerialNumber, Version, BuildNumber, Status /format:csv.xsl

===PC:===
wmic /output:C:\PC.csv COMPUTERSYSTEM get CurrentTimeZone, Description, Domain, TotalPhysicalMemory, Model, Name, UserName /format:csv.xsl

===Memory:===
wmic /output:C:\Mem.csv MEMLOGICAL get /all /format:csv.xsl

===NIC:===
wmic /output:C:\NIC.csv NICCONFIG get DNSDomain, DNSHostName, DefaultIPGateway, Description, IPAddress, IPSubnet, MACAddress, ServiceName, WINSPrimaryServer, WINSSecondaryServer /format:csv.xsl

===Processor:===
wmic /output:C:\Proc.csv CPU get Description, DeviceID, Manufacturer, MaxClockSpeed, Name, Status, SystemName /format:csv.xsl

===QuickFixEngineering:===
wmic /output:C:\QFE.csv QFE get CSName, Description, FixComments, HotFixID, InstalledBy, InstalledOn, Name, ServicePackInEffect /format:csv.xsl

=================================================================
You can find more system information by calling the Path's you would in WMI
CSV output using the Win32_ Path's you'd use in wmi, the very same you'd see in the script-o-matic tool from Microsoft

===Disk:===
wmic /output:C:\Dsk.csv /namespace:\\root\cimv2 path Win32_LogicalDisk get FileSystem, FreeSpace, Size, VolumeSerialNumber, VolumeName, caption, description /format:csv.xsl

===PC:===
wmic /output:C:\PC.csv /namespace:\\root\cimv2 path Win32_ComputerSystem get CurrentTimeZone, Description, Domain, TotalPhysicalMemory, Model, Name, UserName /format:csv.xsl

===BIOS:===
wmic /output:C:\Bios.csv /namespace:\\root\cimv2 path Win32_BIOS get Name, SMBIOSBIOSVersion, SerialNumber, Version, BuildNumber, Status /format:csv.xsl

===Memory:===
wmic /output:C:\Mem.csv /namespace:\\root\cimv2 path Win32_LogicalMemoryConfiguration get AvailableVirtualMemory, Caption, Description, Name, SettingID, TotalPageFileSpace, TotalPhysicalMemory, TotalVirtualMemory /format:csv.xsl

===NIC:===
wmic /output:C:\NIC.csv /namespace:\\root\cimv2 path Win32_NetworkAdapterConfiguration get Caption, DNSDomain, DNSHostName, DefaultIPGateway, Description, IPAddress, IPSubnet, MACAddress, ServiceName, WINSPrimaryServer, WINSSecondaryServer /format:csv.xsl

===Processor:===
wmic /output:C:\Proc.csv /namespace:\\root\cimv2 path Win32_Processor get Caption, Description, DeviceID, Manufacturer, MaxClockSpeed, Name, Status, SystemName /format:csv.xsl

===QuickFixEngineering:===
wmic /output:C:\QFE.csv /namespace:\\root\cimv2 path Win32_QuickFixEngineering get CSName, Caption, Description, FixComments, HotFixID, InstalledBy, InstalledOn, Name, ServicePackInEffect /format:csv.xsl

===PlugNPlay:===
wmic /output:C:\PnP.csv /namespace:\\root\cimv2 path Win32_PNPEntity get ConfigManagerErrorCode, DeviceID, Service, Status, SystemName /format:csv.xsl

Friday, March 30, 2012

Tribulant Wordpress Shopping Cart - Canada Post Module



Issues with Tribulant Shopping Cart, especially with Canada Post module.  Need to set-up Canada Post Gateway account efficiently and integrate it correctly with Canada Post module? I re-wrote this module to work better, like the UPS module.  Be warned that the Canada Post module has issues.
Contact me for details and stories.



Tribulant implement the following free Canada Post shipping module
http://www.allaboutweb.ca/sf/canship/developer.demo.php

"It's been a long time. I don't remember when I did/updated it. I just checked the sf.net at http://sourceforge.net/projects/canship/ : last update at 2009, registed date was 2003."  Raymond Liang, May 03, 2012





Wednesday, March 28, 2012

Google Paid Search


RVM on Centos


Installing RVM (Ruby Version Manager) on CentOS 5.6

In this blog post I explain how to install Wayne Seguin's RVM (Ruby Version Manager) on CentOS 5.6. I will be following the installation instructions for a "Single-User Installation as a standard user". I already have installed git 1.6 and Ruby 1.8.7.



What CentOS version are you running?

First, confirm what version of CentOS you're running:
$ cat /etc/issue
CentOS release 5.6 (Final)

As you can see, I'm running 5.6, but these instructions may work for earlier versions.

What git version are you running?

The RVM installation instructions recommend having git version 1.7 or later. What do I have?
$ git --version
git version 1.6.1
I'm okay with this for the moment. The standard CentOS repositories do not have a newer version; in the CentOS universe, this is the latest version of Git (although you could get a newer version by adding a different repo). If I run into trouble later, I'll have this potential git upgrade as a possible solution.


What terminal are you running?

I believe the RVM installation instructions assume you are using Bash as a terminal. Check what terminal you are using by running the following command:
$ ps -p$$ -ocmd=
ps -p$$ -ocmd=
bash -v
That tells me I'm running bash. Confirm by asking it for the specific version:
$ bash --version
bash --version
GNU bash, version 3.2.25(1)-release (i686-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.


Installation: Three steps

The installation instructions list three steps for completing the RVM installation package:
  1. Download and run the RVM installation script
  2. Load RVM into your shell sessions as a function
  3. Reload shell configuration & test
We'll follow each of these in turn.


Download and run the RVM installation script

Copy the following line into your terminal:
$ bash < <(curl -sk https://rvm.beginrescueend.com/install/rvm)
For me, this produced the following output:
Initialized empty Git repository in /home/arsturges/.rvm/src/rvm/.git/
remote: Counting objects: 4930, done.
remote: Compressing objects: 100% (2305/2305), done.
remote: Total 4930 (delta 3194), reused 3552 (delta 1943)
Receiving objects: 100% (4930/4930), 1.60 MiB | 1646 KiB/s, done.
Resolving deltas: 100% (3194/3194), done.

  RVM:  Shell scripts enabling management of multiple ruby environments.
  RTFM: https://rvm.beginrescueend.com/
  HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
  
Installing RVM to /home/arsturges/.rvm/~/.rvm ~/.rvm/src/rvm
~/.rvm/src/rvm

    Correct permissions for base binaries in /home/arsturges/bin...
    Copying manpages into place.


Notes for Linux ( CentOS release 5.6 (Final) )

NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
             This is the *original* / standard Ruby Language Interpreter
      'ree'  represents Ruby Enterprise Edition
      'rbx'  represents Rubinius

bash >= 3.2 is required
curl is required
git is required (>= 1.7 recommended)
patch is required (for ree and some ruby-head's).

If you wish to install rbx and/or Ruby 1.9 head (MRI) (eg. 1.9.2-head),
then you must install and use rvm 1.8.7 first.

If you wish to have the 'pretty colors' again,
  set 'export rvm_pretty_print_flag=1' in ~/.rvmrc.

dependencies:
  # For RVM
  rvm: yum install -y bash curl git # NOTE: For git you need the EPEL repository enabled

  # For Ruby (MRI & Ree) you should install the following OS dependencies:
  ruby: yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel ;
        yum install -y make bzip2 ;
        yum install -y iconv-devel # NOTE: For centos 5.4 final iconv-devel might not be available :(

  # For JRuby (if you wish to use it) you will need:
  jruby: yum install -y java

For rbx (Rubinius) more then 600MB of free RAM required.


  You must now complete the install by loading RVM in new shells.

  1) Place the folowing line at the end of your shell's loading files
     (.bashrc or .bash_profile for bash and .zshrc for zsh),
     after all PATH/variable settings:

     [[ -s "/home/arsturges/.rvm/scripts/rvm" ]] && source "/home/arsturges/.rvm/scripts/rvm"  # This loads RVM into a shell session.

     You only need to add this line the first time you install rvm.

  2) Ensure that there is no 'return' from inside the ~/.bashrc file,
     otherwise rvm may be prevented from working properly.

     
  This means that if you see something like:

    '[ -z "$PS1" ] && return'

  then you change this line to:

  if [[ -n "$PS1" ]] ; then

    # ... original content that was below the '&& return' line ...

  fi # <= be sure to close the if at the end of the .bashrc.

  # This is a good place to source rvm v v v
  [[ -s "/home/arsturges/.rvm/scripts/rvm" ]] && source "/home/arsturges/.rvm/scripts/rvm"  # This loads RVM into a shell session.

EOF - This marks the end of the .bashrc file

     Be absolutely *sure* to REMOVE the '&& return'.

     If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile.

     Placing all non-interactive (non login) items in the .bashrc,
     including the 'source' line above and any environment settings.

  3) CLOSE THIS SHELL and open a new one in order to use rvm.
  

Installation of RVM to /home/arsturges/.rvm/ is complete.


Andy Sturges,

Thank you very much for using RVM! I sincerely hope that RVM helps to
make your work both easier and more enjoyable.

If you have any questions, issues and/or ideas for improvement please
join#rvm on irc.freenode.net and let me know, note you must register
(http://bit.ly/5mGjlm) and identify (/msg nickserv  ) to
talk, this prevents spambots from ruining our day.

My irc nickname is 'wayneeseguin' and I hang out in #rvm typically

  ~09:00-17:00EDT and again from ~21:00EDT-~23:00EDT

If I do not respond right away, please hang around after asking your
question, I will respond as soon as I am back.  It is best to talk in
#rvm itself as then other users can help out should I be offline.

Be sure to get head often as rvm development happens fast,
you can do this by running 'rvm get head' followed by 'rvm reload'
or opening a new shell

  w⦿‿⦿t

    ~ Wayne

Notice a few things about this comprehensive output:
  • Wayne has customized his installation script (which produced this file) to produce output specific to my linux distribution (CentOS 5.6). This means he provides "yum" commands, instead of, say, Ubuntu's "apt-get".
  • He notes several dependencies:
    dependencies:
      # For RVM
      rvm: yum install -y bash curl git # NOTE: For git you need the EPEL repository enabled
    
      # For Ruby (MRI & Ree) you should install the following OS dependencies:
      ruby: yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel ;
            yum install -y make bzip2 ;
            yum install -y iconv-devel # NOTE: For centos 5.4 final iconv-devel might not be available :(
    
    We can run these commands as-is, which I'll do below.
  • He gives us three steps to complete the installation:
    1. Place the folowing line at the end of your shell's loading files
      (.bashrc or .bash_profile for bash and .zshrc for zsh),
      after all PATH/variable settings:
    2. Ensure that there is no 'return' from inside the ~/.bashrc file,
      otherwise rvm may be prevented from working properly.
    3. CLOSE THIS SHELL and open a new one in order to use rvm.
    These three steps basically take care of steps two and three in the on-line installation instructions.
  • It talks about editing the .bashrc or .bash_profile. This can be done by using the vim text editor at the command line from your home (~) director:
    $ cd ~
    $ vim .bashrc
    $ vim .bash_profile
So let's get to it.


Meet RVM's listed dependencies

As noted in the script output above, we should meet RVM's and Ruby's dependencies. I don't care about JRuby or other editions, so I'll ignore their dependencies. Copying the line from above:
$ yum install -y bash curl
Loaded plugins: fastestmirror
You need to be root to perform this command.
I need to be root, so I'll re-run the command, only prepending "sudo" in front of it:
$ sudo yum install -y bash curl
[sudo] password for arsturges: 
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.facebook.net
 * extras: mirror.nwresd.org
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: centos.mirrors.hoobly.com
Setting up Install Process
Package bash-3.2-24.el5.i386 already installed and latest version
Package curl-7.15.5-9.el5_6.2.i386 already installed and latest version
Nothing to do
This tells me those packages are all up-to-date. Next, try the Ruby OS dependencies (again adding "sudo"):
sudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel
This gives me the following output:
$ sudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.facebook.net
 * extras: mirror.5ninesolutions.com
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: centos.mirrors.hoobly.com
Setting up Install Process
Package gcc-c++-4.1.2-50.el5.i386 already installed and latest version
Package patch-2.5.4-31.el5.i386 already installed and latest version
Package readline-5.1-3.el5.i386 already installed and latest version
Package readline-devel-5.1-3.el5.i386 already installed and latest version
Package zlib-1.2.3-3.i386 already installed and latest version
Package zlib-devel-1.2.3-3.i386 already installed and latest version
Package openssl-devel-0.9.8e-12.el5_5.7.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package libffi-devel.i386 0:3.0.9-1.el5.rf set to be updated
--> Processing Dependency: libffi = 3.0.9-1.el5.rf for package: libffi-devel
--> Processing Dependency: libffi.so.5 for package: libffi-devel
---> Package libyaml-devel.i386 0:0.1.3-1.el5.rf set to be updated
--> Processing Dependency: libyaml = 0.1.3-1.el5.rf for package: libyaml-devel
--> Processing Dependency: libyaml-0.so.2 for package: libyaml-devel
--> Running transaction check
---> Package libffi.i386 0:3.0.9-1.el5.rf set to be updated
---> Package libyaml.i386 0:0.1.3-1.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================
 Package               Arch         Version                  Repository        Size
====================================================================================
Installing:
 libffi-devel          i386         3.0.9-1.el5.rf           rpmforge          16 k
 libyaml-devel         i386         0.1.3-1.el5.rf           rpmforge          12 k
Installing for dependencies:
 libffi                i386         3.0.9-1.el5.rf           rpmforge          87 k
 libyaml               i386         0.1.3-1.el5.rf           rpmforge         115 k

Transaction Summary
====================================================================================
Install       4 Package(s)
Upgrade       0 Package(s)

Total download size: 230 k
Downloading Packages:
(1/4): libyaml-devel-0.1.3-1.el5.rf.i386.rpm                 |  12 kB     00:00     
(2/4): libffi-devel-3.0.9-1.el5.rf.i386.rpm                  |  16 kB     00:00     
(3/4): libffi-3.0.9-1.el5.rf.i386.rpm                        |  87 kB     00:00     
(4/4): libyaml-0.1.3-1.el5.rf.i386.rpm                       | 115 kB     00:00     
------------------------------------------------------------------------------------
Total                                                84 kB/s | 230 kB     00:02     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : libyaml                                                      1/4 
  Installing     : libffi                                                       2/4 
  Installing     : libffi-devel                                                 3/4 
  Installing     : libyaml-devel                                                4/4 

Installed:
  libffi-devel.i386 0:3.0.9-1.el5.rf       libyaml-devel.i386 0:0.1.3-1.el5.rf      

Dependency Installed:
  libffi.i386 0:3.0.9-1.el5.rf             libyaml.i386 0:0.1.3-1.el5.rf            

Complete!
As you can see, it found most of those packages installed and up-to-date, but it did find some new ones as well, which it installed without issue.

The next two lines I'll run together, as Wayne wrote them, split by a semi-collon:
sudo yum install -y make bzip2; sudo yum install -y iconv-devel
Without listing all the output, I'll say that these packages were found to be up-to-date.

Now that we've met all the listed dependencies, we continue by following the enumerated instructions. Step one is: Place the folowing line at the end of your shell's loading files (.bashrc or .bash_profile for bash and .zshrc for zsh), after all PATH/variable settings:
[[ -s "/home/arsturges/.rvm/scripts/rvm" ]] && source "/home/arsturges/.rvm/scripts/rvm"  # This loads RVM into a shell session.
The .bashrc file is run each time you open a Bash shell terminal window, and since we'll be running RVM througha Bash shell, this line will be invoked before we ever need to use RVM. To add it, simply copy it, open the file with vim, and paste it in as the last line in the file.
$ cd ~
$ vim .bashrc
Here's what my file looks like after I've added the line:
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions
[[ -s "/home/arsturges/.rvm/scripts/rvm" ]] && source "/home/arsturges/.rvm/scripts/rvm"  # This loads RVM into a shell session.
The next step, according the instructions:


Ensure that there is no 'return' from inside the ~/.bashrc file

The script instructs us to "Ensure that there is no 'return' from inside the ~/.bashrc file,
otherwise rvm may be prevented from working properly." I checked mine and saw no such thing, so I'll continue.


Restart the shell

The next step: "CLOSE THIS SHELL and open a new one in order to use rvm." Just close and re-open the terminal window.

That's it for the script instructions. To see what to do next, we return to the on-line instructions, where we've basically completed step three. The next thing to do is see if it worked.


Test the installation

Type the following command, which should return the phrase "rvm is a function":
$ type rvm | head -1
rvm is a function
I have no idea what that does or why it worked, but as you can see, it worked for me. Now run rvm notes as recommended:
$ rvm notes


Notes for Linux ( CentOS release 5.6 (Final) )

NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
             This is the *original* / standard Ruby Language Interpreter
      'ree'  represents Ruby Enterprise Edition
      'rbx'  represents Rubinius

bash >= 3.2 is required
curl is required
git is required (>= 1.7 recommended)
patch is required (for ree and some ruby-head's).

If you wish to install rbx and/or Ruby 1.9 head (MRI) (eg. 1.9.2-head),
then you must install and use rvm 1.8.7 first.

If you wish to have the 'pretty colors' again,
  set 'export rvm_pretty_print_flag=1' in ~/.rvmrc.

dependencies:
  # For RVM
  rvm: yum install -y bash curl git # NOTE: For git you need the EPEL repository enabled

  # For Ruby (MRI & Ree) you should install the following OS dependencies:
  ruby: yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel ;
        yum install -y make bzip2 ;
        yum install -y iconv-devel # NOTE: For centos 5.4 final iconv-devel might not be available :(

  # For JRuby (if you wish to use it) you will need:
  jruby: yum install -y java

For rbx (Rubinius) more then 600MB of free RAM required.

This just reminds us of the dependencies we've already met for Ruby, and of the dependencies we'd need to meet if we wanted to run JRuby or rbx. Otherwise, we should be done with the installation, and ready to use RVM on CentOS 5.6.


Try it out

$ rvm list known

# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.6-head
[ruby-]1.8.7[-p334]
[ruby-]1.8.7-head
[ruby-]1.9.1-p378
[ruby-]1.9.1[-p431]
[ruby-]1.9.1-head
[ruby-]1.9.2[-p180]
[ruby-]1.9.2-head
ruby-head

# GoRuby
goruby

# JRuby
jruby-1.2.0
jruby-1.3.1
jruby-1.4.0
jruby-1.6.0
jruby-1.6.1
jruby[-1.6.2]
jruby-head

# Rubinius
rbx-1.0.1
rbx-1.1.0
rbx-1.1.1
rbx-1.2.0
rbx-1.2.1
rbx-1.2.2
rbx-1.2.3
rbx[-head]

# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2011.03]
ree-1.8.6-head
ree-1.8.7-head

# Kiji
kiji

# MagLev
maglev[-25913]
maglev-head

# Mac OS X Snow Leopard Only
macruby[-0.10]
macruby-nightly
macruby-head

# IronRuby -- Not implemented yet.
ironruby-0.9.3
ironruby-1.0-rc2
ironruby-head
This shows a list of all the versions of Ruby RVM is capable of installing. For the moment, I just want a standard installation of the latest Ruby version, which is Ruby 1.9.2:
$ rvm install 1.9.2
Installing Ruby from source to: /home/arsturges/.rvm/rubies/ruby-1.9.2-p180, this may take a while depending on your cpu(s)...

ruby-1.9.2-p180 - #fetching 
ruby-1.9.2-p180 - #downloading ruby-1.9.2-p180, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 8609k  100 8609k    0     0   828k      0  0:00:10  0:00:10 --:--:-- 1078k
ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /home/arsturges/.rvm/src/ruby-1.9.2-p180
ruby-1.9.2-p180 - #extracted to /home/arsturges/.rvm/src/ruby-1.9.2-p180
Fetching yaml-0.1.3.tar.gz to /home/arsturges/.rvm/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  455k  100  455k    0     0   586k      0 --:--:-- --:--:-- --:--:--  730k
--no-same-owner
Configuring yaml in /home/arsturges/.rvm/src/yaml-0.1.3.
Compiling yaml in /home/arsturges/.rvm/src/yaml-0.1.3.
Installing yaml to /home/arsturges/.rvm/usr
ruby-1.9.2-p180 - #configuring 
ruby-1.9.2-p180 - #compiling 
ruby-1.9.2-p180 - #installing 
Removing old Rubygems files...
Installing rubygems dedicated to ruby-1.9.2-p180...
Retrieving rubygems-1.6.2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  236k  100  236k    0     0  1053k      0 --:--:-- --:--:-- --:--:-- 9025k
Extracting rubygems-1.6.2 ...
Installing rubygems for /home/arsturges/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
Installation of rubygems completed successfully.
ruby-1.9.2-p180 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-p180 - #importing default gemsets (/home/arsturges/.rvm/gemsets/)
Install of ruby-1.9.2-p180 - #complete 
This took about 10 minutes on this particular server. Now that it's done and installed, play around with it:
$ ruby -v
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.01
$ which ruby
/usr/local/bin/ruby
$ rvm use 1.9.2
Using /home/arsturges/.rvm/gems/ruby-1.9.2-p180
$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
$ which ruby
~/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
As you can see, it's important to use the "rvm use" command to actually switch to a version of Ruby installed by RVM.


Conclusion

We followed the on-line RVM installation instructions on CentOS 5.6, first running the bash script, then following the instructions output by the script, including installing dependencies and adding one line to the .bashrc file. We did this without needing to upgrade git beyond what the CentOS default repositories offer.


Summary of commands for power users

$ cat /etc/issue
$ git --version
$ bash --version
$ bash < <(curl -sk https://rvm.beginrescueend.com/install/rvm)
$ sudo yum install -y bash curl git ; 
sudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel ; 
sudo yum install -y make bzip2 ; 
yum install -y iconv-devel
Now place the following line in your .bashrc (but copy the one generated by your own installation, not mine):

[[ -s "/home/arsturges/.rvm/scripts/rvm" ]] && source "/home/arsturges/.rvm/scripts/rvm"  # This loads RVM into a shell session.
Next, make sure that there is no 'return' from inside the ~/.bashrc file.
Now restart the shell, and test the installation:
$ type rvm | head -1
rvm is a function
This should return the phrase "rvm is a function".
$ rvm notes
$ rvm list known
$ rvm install 1.9.2
Now try it out:
$ ruby -v
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.01
$ which ruby
/usr/local/bin/ruby
$ rvm use 1.9.2
Using /home/arsturges/.rvm/gems/ruby-1.9.2-p180
$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
$ which ruby
~/.rvm/rubies/ruby-1.9.2-p180/bin/ruby

Restored from http://web.archive.org/web/20141018021928/http://www.andrewsturges.com:80/2011/06/installing-rvm-ruby-version-manager-on.html